:root {
  --navy: #1e3a5f;
  --gold: #d4af37;
  --light-navy: #2c5282;
  --dark-navy: #152943;
}

[data-theme=dark] {
  --navy: #0f1c2e;
  --gold: #ffd700;
  --light-navy: #1a2942;
  --dark-navy: #070d18;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.7;
  font-size: 16px;
  color: #2c3e50;
}

[data-theme=dark] body {
  background-color: #0a0e1a;
  color: #e8e8e8;
}

/* Enhanced Typography */
h1 { font-size: 3rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.875rem; }
h3 { font-size: 2rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.75rem; }
h4 { font-size: 1.5rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.625rem; }
p { margin-bottom: 1.25rem; }

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; line-height: 1.3; }
  h2 { font-size: 1.5rem; line-height: 1.3; }
  h3 { font-size: 1.25rem; line-height: 1.3; }
  h4 { font-size: 1.1rem; line-height: 1.3; }
  body { font-size: 14px; line-height: 1.6; padding: 0 0.75rem; }
  
  /* 모바일 섹션 패딩 최적화 */
  section { padding: 2.5rem 0 !important; }
  
  /* 모바일 카드 패딩 */
  .glass-card { padding: 1.25rem !important; }
  
  /* 모바일 그리드 간격 */
  .grid { gap: 1rem !important; }
  
  /* 모바일 텍스트 크기 조정 */
  .text-xl { font-size: 1rem !important; }
  .text-2xl { font-size: 1.25rem !important; }
  .text-3xl { font-size: 1.5rem !important; }
  .text-4xl { font-size: 1.75rem !important; }
  .text-5xl { font-size: 2rem !important; }
  .text-6xl { font-size: 2.5rem !important; }
  
  /* 모바일 아이콘 크기 */
  .fa-5xl, .fa-6xl { font-size: 2.5rem !important; }
  
  /* 모바일 버튼 */
  .btn-primary { padding: 0.75rem 1.5rem !important; font-size: 0.9rem !important; }
  
  /* 모바일 여백 조정 */
  .mb-16 { margin-bottom: 2rem !important; }
  .mb-12 { margin-bottom: 1.5rem !important; }
  .mb-8 { margin-bottom: 1rem !important; }
  .mb-6 { margin-bottom: 0.75rem !important; }
  .mb-4 { margin-bottom: 0.5rem !important; }
  
  .p-8, .p-12 { padding: 1.25rem !important; }
  .py-20 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
  
  /* 모바일 서비스 카드 최적화 */
  .service-card h3 { font-size: 1.1rem !important; line-height: 1.3 !important; }
  .service-card p { font-size: 0.85rem !important; line-height: 1.3 !important; }
  .service-card li { font-size: 0.8rem !important; line-height: 1.4 !important; }
  
  /* 모바일 네비게이션 로고 */
  nav .logo-footer { height: 3rem !important; }
  nav h1 { font-size: 1.1rem !important; }
  nav p { font-size: 0.65rem !important; }
  
  /* 커스텀 커서 숨김 */
  .custom-cursor, .cursor-dot { display: none !important; }
  
  /* 모바일 히어로 최적화 */
  .hero-section { min-height: 50vh !important; padding: 3rem 1rem !important; }
  
  /* 모바일 이미지 최적화 */
  img { max-width: 100%; height: auto; }
  
  /* 모바일 스페이스 최적화 */
  .space-y-4 > * + * { margin-top: 0.75rem !important; }
  .space-y-3 > * + * { margin-top: 0.5rem !important; }
  .space-y-2 > * + * { margin-top: 0.4rem !important; }
  
  /* 모바일 CEO 섹션 */
  .max-w-7xl { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
}

/* Custom Cursor */
.custom-cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.15s ease;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  transition: all 0.1s ease;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  z-index: 9998;
  transition: width 0.1s ease;
}

/* Page Transition Overlay */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--dark-navy), var(--navy));
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

.page-transition .spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Dark Mode Toggle */
.dark-mode-toggle {
  position: fixed;
  top: 90px;
  right: 30px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  transform: scale(1.1) rotate(20deg);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* 3D Compass Container */
#compass-3d {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  z-index: 1;
}

/* Premium Gradient Background */
.compass-bg {
  background: linear-gradient(135deg, var(--dark-navy) 0%, var(--navy) 50%, var(--light-navy) 100%);
  position: relative;
}

[data-theme=dark] .compass-bg {
  background: linear-gradient(135deg, #070d18 0%, #0f1c2e 50%, #1a2942 100%);
}

.compass-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Hero Section with Video Background */
.hero-section {
  background: linear-gradient(135deg, rgba(21, 41, 67, 0.85) 0%, rgba(30, 58, 95, 0.8) 100%);
  position: relative;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
  opacity: 0.25;
  filter: brightness(0.7) contrast(1.1);
}

[data-theme=dark] .hero-section {
  background: linear-gradient(135deg, rgba(7, 13, 24, 0.9) 0%, rgba(15, 28, 46, 0.85) 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 2rem;
}

[data-theme=dark] .glass-card {
  background: rgba(26, 41, 66, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Premium Service Card */
.service-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
  transition: left 0.6s ease;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  border-color: var(--gold);
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Compass Icon Animation */
.compass-icon {
  animation: rotate 20s linear infinite;
}

/* Floating Particles Effect - DISABLED */
.particles {
  display: none;
}

/* Accent Colors - NO GLOW */
.compass-accent {
  color: var(--gold);
}

.compass-border {
  border-color: var(--gold);
}

/* Hover Effects */
.hover-gold {
  transition: all 0.3s ease;
}

.hover-gold:hover {
  color: var(--gold);
  transform: translateY(-2px);
}

/* Floating Button with Animation */
.floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  animation: float-btn 3s ease-in-out infinite;
}

@keyframes float-btn {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Navigation - Same as Footer */
/* No separate nav-glass needed - using compass-bg class directly */

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Premium Button Styles */
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #c4951f 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

/* Scroll Animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stats Counter Animation */
.stat-number {
  font-variant-numeric: tabular-nums;
  transition: all 0.5s ease;
}

/* Image Overlay Effects */
.image-overlay {
  position: relative;
  overflow: hidden;
}

.image-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.3) 0%, rgba(212, 175, 55, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
  opacity: 1;
}

.image-overlay img {
  transition: transform 0.5s ease;
}

.image-overlay:hover img {
  transform: scale(1.05);
}

/* Premium Section Divider */
.section-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 60px auto;
  max-width: 200px;
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--navy) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Logo Clean Rendering - Remove Background Completely */
.logo-clean {
  mix-blend-mode: multiply;
  filter: contrast(1.5) brightness(1.2) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: transparent;
}

[data-theme=dark] .logo-clean {
  mix-blend-mode: lighten;
  filter: contrast(1.3) brightness(1.4) saturate(1.2);
}

/* Logo for Footer/Nav - Now Transparent PNG */
.logo-footer {
  filter: brightness(1.1) contrast(1.1) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: transparent;
}

[data-theme=dark] .logo-footer {
  filter: brightness(1.2) contrast(1.1) saturate(1.2);
}

/* Loading Animation */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Media Queries */
/* Loading State */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* Focus States for Accessibility */
*:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

button:focus, a:focus {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .custom-cursor, .cursor-dot {
    display: none;
  }
  
  #compass-3d {
    width: 200px;
    height: 200px;
  }
  
  .glass-card {
    padding: 1.5rem;
    border-radius: 12px;
  }
  
  body {
    padding: 0 1rem;
  }
}
