/* =============================================
   디자인 토큰 (CSS 변수)
   ============================================= */
:root {
  /* 브랜드 컬러 */
  --color-primary:        #3561ff;
  --color-primary-hover:  #1e46e0;
  --color-accent:         #6135ff;
  --color-accent-hover:   #4d1fe0;
  --color-purple:         #7324ff;
  --color-dark:           #111823;

  /* 텍스트 컬러 */
  --color-text:           #212121;
  --color-text-sub:       #757575;
  --color-text-muted:     #999999;
  --color-text-white:     #ffffff;

  /* 배경 컬러 */
  --color-bg:             #ffffff;
  --color-bg-alt:         #f7f7f7;
  --color-bg-dark:        #111823;

  /* 테두리 */
  --color-border:         #e5e5e5;
  --color-border-dark:    #d3d3d3;

  /* 폰트 */
  --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    'Apple SD Gothic Neo', Roboto, 'Noto Sans KR', 'Segoe UI', 'Malgun Gothic',
    sans-serif;

  /* 텍스트 크기 */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
}

/* =============================================
   베이스 리셋 & 전역 스타일
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 767px) {
  body {
    font-size: var(--text-xs);
  }
}

/* =============================================
   타이포그래피
   ============================================= */
h1, .h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h2, .h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

h3, .h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

h4, .h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--color-text);
}

h5, .h5 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5;
}

h6, .h6 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

@media (max-width: 767px) {
  h1, .h1 { font-size: 2rem; }
  h2, .h2 { font-size: 1.625rem; }
  h3, .h3 { font-size: 1.25rem; }
  h4, .h4 { font-size: 1.125rem; }
  h5, .h5 { font-size: 1rem; }
  h6, .h6 { font-size: 0.875rem; }
}

p { line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* =============================================
   버튼 공통 스타일
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-white);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-text-white);
  border-color: var(--color-accent);
}
.btn-accent:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-text-white);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--color-text-white);
  border-color: var(--color-text-white);
}
.btn-outline-white:hover {
  background-color: var(--color-text-white);
  color: var(--color-dark);
}

.btn-dark {
  background-color: var(--color-dark);
  color: var(--color-text-white);
  border-color: var(--color-dark);
}
.btn-dark:hover {
  background-color: #1d2535;
  border-color: #1d2535;
}

.btn-sm {
  font-size: var(--text-xs);
  padding: 0.5rem 1rem;
}

.btn-lg {
  font-size: var(--text-base);
  padding: 1rem 2rem;
}

/* =============================================
   공통 컨테이너
   ============================================= */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (max-width: 767px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* =============================================
   섹션 공통
   ============================================= */
.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 767px) {
  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* =============================================
   TopBar 모바일 대응
   ============================================= */
@media (max-width: 767px) {
  .topbar-naver-text {
    font-size: 12px;
  }
}

/* =============================================
   공통 Spacer
   ============================================= */
.spacer-12 { height: 12px; }
.spacer-30 { height: 30px; }
.spacer-32 { height: 32px; }
.spacer-40 { height: 40px; }
.spacer-48 { height: 48px; }
.spacer-52 { height: 52px; }

/* =============================================
   히어로 높이
   ============================================= */
.hero-spacer { height: 703px; }

@media (max-width: 767px) {
  .hero-spacer { height: 400px; }
}

/* =============================================
   YouTube 섹션
   ============================================= */
.youtube-spacer-top { height: 162px; }
.youtube-spacer-bottom { height: 150px; }
.youtube-title { font-size: 24px; }
.youtube-desc { font-size: 18px; }

/* =============================================
   폼 필드 공통
   ============================================= */
.contact-field { margin-bottom: 20px; }

.form-input {
  padding: 5px 7px !important;
  font-size: var(--text-sm);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  outline: none;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(53, 97, 255, 0.15) !important;
}

.form-input::placeholder { color: var(--color-text-muted); }

/* =============================================
   Leaflet 지도 팝업
   ============================================= */
.leaflet-popup-content { font-size: 14px !important; }

/* =============================================
   데스크탑 기본값
   ============================================= */
.service-spacer-top { height: 153px; }
.service-spacer-bottom { height: 150px; }
.gallery-spacer-top { height: 163px; }
.gallery-spacer-mid { height: 286px; }
.gallery-spacer-bottom { height: 178px; }
.gallery-dark-spacer-top { height: 122px; }
.gallery-dark-spacer-bottom { height: 106px; }
.contact-spacer-top { height: 118px; }
.contact-spacer-bottom { height: 155px; }

.center-container {
  padding-top: 150px;
  padding-bottom: 150px;
}

.center-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.branches-container {
  padding-top: 150px;
  padding-bottom: 5rem;
}

.branches-map-list { height: 600px; }
.branches-list { max-height: 600px; }

/* =============================================
   모바일 대응 (max-width: 767px)
   ============================================= */
@media (max-width: 767px) {
  .header-logo {
    display: none !important;
    height: auto !important;
  }
  .topbar-naver-text { display: none; }
  .connect-title { font-size: 26px !important; line-height: 1.5 !important; }
  .connect-desc { font-size: 14px !important; }
  .service-spacer-top { height: 60px; }
  .service-spacer-bottom { height: 60px; }
  .service-main-img { height: auto !important; max-width: 100% !important; }
  .service-title { font-size: 22px !important; line-height: 1.4 !important; }
  .service-body-text { font-size: 14px !important; }
  .gallery-spacer-top { height: 60px; }
  .gallery-spacer-mid { height: 80px; }
  .gallery-spacer-bottom { height: 80px; }
  .gallery-dark-spacer-top { height: 40px; }
  .gallery-dark-spacer-bottom { height: 40px; }
  .topbar-wrap { position: relative !important; }
  .branch-cards-grid { grid-template-columns: 1fr !important; }
  .shop-grid { grid-template-columns: repeat(2, 1fr) !important; margin: 0 !important; }
  .youtube-spacer-top { height: 40px; }
  .youtube-spacer-bottom { height: 60px; }
  .youtube-title { font-size: 18px !important; }
  .youtube-desc { font-size: 14px !important; }
  .gallery-infographic { width: 100% !important; height: auto !important; }
  .gallery-title { font-size: 20px !important; line-height: 1.4 !important; }
  .gallery-service-img { height: auto !important; max-width: 100% !important; }
  .center-container { padding-top: 60px; padding-bottom: 60px; }
  .center-desc { font-size: 14px !important; margin-bottom: 40px !important; }
  .center-gallery { grid-template-columns: repeat(2, 1fr) !important; gap: 6px; }
  .center-gallery-img { height: 180px !important; }
  .contact-spacer-top { height: 48px; }
  .contact-spacer-bottom { height: 60px; }
  .contact-label { font-size: 15px !important; }
  .phone-input-group { gap: 4px !important; }
  .phone-input { width: 0 !important; flex: 1 1 0 !important; min-width: 0 !important; }
  .branches-container { padding-top: 60px; padding-bottom: 3rem; }
  .branches-map-list { height: auto; flex-direction: column !important; }
  .branches-map { flex: none !important; width: 100% !important; min-height: 250px !important; height: 250px; }
  .branches-list { flex: none !important; width: 100% !important; max-height: 500px !important; border-left: none !important; border-top: none !important; }
  .floating-buttons { top: auto !important; bottom: 70px !important; right: 20px !important; }
  .floating-btn-img { width: 61px !important; height: 61px !important; }
}

/* =============================================
   스크롤 애니메이션 — Reveal
   ============================================= */
.reveal, .reveal-left, .reveal-right, .reveal-fade {
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal { opacity: 0; transform: translateY(36px); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-left { opacity: 0; transform: translateX(-40px); }
.reveal-left.is-visible { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0; transform: translateX(40px); }
.reveal-right.is-visible { opacity: 1; transform: translateX(0); }

.reveal-fade { opacity: 0; }
.reveal-fade.is-visible { opacity: 1; }

@keyframes heroFadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-btn-animate { animation: heroFadeInUp 0.9s ease 0.5s both; }

.gallery-img-wrap { overflow: hidden; }
.gallery-img-wrap img { transition: transform 0.45s ease; }
.gallery-img-wrap:hover img { transform: scale(1.06); }

/* =============================================
   반응형 표시/숨김
   ============================================= */
.desktop-only { display: none !important; }
.mobile-only { display: flex !important; }

@media (min-width: 768px) {
  .desktop-only { display: flex !important; }
  .desktop-only img, .desktop-only.header-logo { display: block !important; }
  .mobile-only { display: none !important; }
}

/* =============================================
   Flexbox/Grid 유틸리티 (Tailwind 대체)
   ============================================= */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.w-6 { width: 1.5rem; }
.h-0\.5 { height: 0.125rem; }
.bg-\[\#212121\] { background-color: #212121; }
.p-2 { padding: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.text-center { text-align: center; }
.hidden { display: none; }

/* Tailwind transition helpers */
.transition-all { transition: all 0.15s ease; }
.rotate-45 { transform: rotate(45deg); }
.translate-y-2 { transform: translateY(0.5rem); }
.-rotate-45 { transform: rotate(-45deg); }
.-translate-y-2 { transform: translateY(-0.5rem); }
.opacity-0 { opacity: 0; }

/* Header hamburger */
.hamburger-line {
  display: block;
  width: 1.5rem;
  height: 0.125rem;
  background-color: #212121;
  transition: all 0.15s ease;
}
