/* ================================================================
   Apex Networks — Design System
   Bootstrap 5 + Custom CSS
   Fonts: Inter (body) + Orbitron (headings/logo)
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Orbitron:wght@600;700;900&display=swap');

/* ──────────────────────────────────────────────
   CSS 변수 (토큰)
────────────────────────────────────────────── */
:root {
  --primary:       #00d4ff;
  --primary-dim:   #00a8cc;
  --secondary:     #7b2ff7;
  --accent:        #ff6b35;
  --success:       #00e676;
  --warning:       #ffd740;
  --danger:        #ff5252;

  --dark-bg:       #050b18;
  --dark-bg2:      #080f20;
  --card-bg:       #0d1526;
  --card-border:   rgba(0, 212, 255, 0.12);
  --card-border-h: rgba(0, 212, 255, 0.4);

  --text-primary:  #f0f6ff;
  --text-muted:    #7a8fa6;
  --text-light:    #b0c4de;

  --gradient-h:    linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%);
  --gradient-v:    linear-gradient(180deg, #00d4ff 0%, #7b2ff7 100%);
  --gradient-cta:  linear-gradient(135deg, #ff6b35 0%, #7b2ff7 100%);
  --glow-primary:  0 0 30px rgba(0, 212, 255, 0.3);
  --glow-secondary:0 0 30px rgba(123, 47, 247, 0.3);

  --font-body:     'Inter', sans-serif;
  --font-heading:  'Orbitron', 'Inter', sans-serif;

  --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --radius:        12px;
  --radius-lg:     20px;
}

/* ──────────────────────────────────────────────
   리셋 & 기본 스타일
────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--dark-bg);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dim); }

/* ──────────────────────────────────────────────
   유틸리티
────────────────────────────────────────────── */
.gradient-text {
  background: var(--gradient-h);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.6); }
}

/* ──────────────────────────────────────────────
   네비게이션
────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
}

#navbar.scrolled {
  background: rgba(5, 11, 24, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: var(--gradient-h);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 16px !important;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--gradient-h);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-link:hover { color: var(--primary) !important; }
.nav-link:hover::after { width: 60%; }

/* ──────────────────────────────────────────────
   버튼
────────────────────────────────────────────── */
.btn-apex {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-apex-primary {
  background: var(--gradient-h);
  color: #fff;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.35);
}

.btn-apex-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.55);
  color: #fff;
}

.btn-apex-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-apex-outline:hover {
  background: rgba(0, 212, 255, 0.1);
  transform: translateY(-2px);
  color: var(--primary);
}

.btn-apex-cta {
  background: var(--gradient-cta);
  color: #fff;
  box-shadow: 0 0 25px rgba(255, 107, 53, 0.4);
}

.btn-apex-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 50px rgba(255, 107, 53, 0.6);
  color: #fff;
}

/* Ripple 효과 */
.btn-apex::after {
  content: '';
  position: absolute;
  width: 0; height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}
.btn-apex:active::after { width: 200px; height: 200px; opacity: 0; }

/* ──────────────────────────────────────────────
   히어로 섹션
────────────────────────────────────────────── */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 11, 24, 0.55) 0%,
    rgba(5, 11, 24, 0.3) 50%,
    rgba(5, 11, 24, 0.9) 100%
  );
  z-index: 1;
}

#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 20px;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fade-in-down 0.8s ease forwards;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  animation: fade-in-up 0.8s 0.2s ease both;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-light);
  font-weight: 400;
  max-width: 620px;
  margin: 0 auto 2.5rem;
  animation: fade-in-up 0.8s 0.4s ease both;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fade-in-up 0.8s 0.6s ease both;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: 4rem;
  animation: fade-in-up 0.8s 0.8s ease both;
}

.hero-stat-item { text-align: center; }
.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  background: var(--gradient-h);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.scroll-indicator {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

.scroll-indicator span { display: block; width: 1.5px; height: 40px; background: linear-gradient(180deg, var(--primary), transparent); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ──────────────────────────────────────────────
   공통 섹션 스타일
────────────────────────────────────────────── */
.section-dark  { background: var(--dark-bg); padding: 100px 0; }
.section-dark2 { background: var(--dark-bg2); padding: 100px 0; }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 3rem;
}

/* ──────────────────────────────────────────────
   피처 카드
────────────────────────────────────────────── */
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-h);
  transform: scaleX(0);
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--card-border-h);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), var(--glow-primary);
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: rgba(0, 212, 255, 0.2);
  box-shadow: var(--glow-primary);
}

.feature-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ──────────────────────────────────────────────
   요금제 카드
────────────────────────────────────────────── */
.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pricing-card.featured {
  border-color: rgba(0, 212, 255, 0.5);
  background: linear-gradient(160deg, rgba(0,212,255,0.06) 0%, rgba(123,47,247,0.06) 100%);
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.12);
  transform: scale(1.03);
}

.pricing-card:hover {
  border-color: var(--card-border-h);
  transform: translateY(-8px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), var(--glow-primary);
}
.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-8px);
}

.pricing-badge {
  position: absolute;
  top: 24px; right: 24px;
  background: var(--gradient-h);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
}

.pricing-plan {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pricing-price sup { font-size: 1.2rem; vertical-align: super; }
.pricing-price sub { font-size: 1rem; color: var(--text-muted); font-family: var(--font-body); font-weight: 400; }

.pricing-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.pricing-features li .check {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.15);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.pricing-features li .cross {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255,82,82,0.1);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────
   How it Works — 단계 표시
────────────────────────────────────────────── */
.step-card {
  text-align: center;
  padding: 32px 20px;
  position: relative;
}

.step-number {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--gradient-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  margin: 0 auto 1.5rem;
  box-shadow: var(--glow-primary);
}

.step-card h4 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.step-card p  { font-size: 0.9rem; color: var(--text-muted); }

.step-connector {
  position: absolute;
  top: 64px; left: calc(50% + 40px);
  width: calc(100% - 80px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.3;
}

/* ──────────────────────────────────────────────
   FAQ 아코디언
────────────────────────────────────────────── */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover { border-color: var(--card-border-h); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.faq-question:hover { color: var(--primary); }

.faq-icon {
  width: 24px; height: 24px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 20px; }
.faq-item.open .faq-icon   { transform: rotate(45deg); color: var(--primary); }

/* ──────────────────────────────────────────────
   스크롤 애니메이션
────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ──────────────────────────────────────────────
   푸터
────────────────────────────────────────────── */
#footer {
  background: #02060f;
  border-top: 1px solid rgba(0, 212, 255, 0.08);
  padding: 60px 0 30px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
  background: var(--gradient-h);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.footer-desc { font-size: 0.9rem; color: var(--text-muted); max-width: 280px; line-height: 1.7; }

.footer-heading { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-primary); margin-bottom: 1rem; }

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 0.875rem; color: var(--text-muted); transition: var(--transition); }
.footer-links a:hover { color: var(--primary); padding-left: 6px; }

.footer-divider { border-color: rgba(255,255,255,0.06); margin: 40px 0 24px; }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 0.9rem;
}
.footer-social a:hover { border-color: var(--primary); color: var(--primary); background: rgba(0,212,255,0.08); }

/* ──────────────────────────────────────────────
   애니메이션 키프레임
────────────────────────────────────────────── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ──────────────────────────────────────────────
   반응형
────────────────────────────────────────────── */
@media (max-width: 768px) {
  .section-dark, .section-dark2 { padding: 70px 0; }
  .hero-stats { gap: 24px; }
  .hero-stat-value { font-size: 1.5rem; }
  .pricing-card.featured { transform: scale(1); }
  .step-connector { display: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-cta-group { flex-direction: column; align-items: center; }
}
