:root {
  /* 더 맑고 깨끗한 클린 테크 톤 */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --line: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  
  /* 포인트 컬러: 더 활기찬 사이버 오렌지 */
  --accent: #e1552a;
  --accent-soft: #fef2f2;
  --accent-border: #fecaca;
  
  /* 보더 라운딩 리듬 (Hierarchy) */
  --radius-xl: 24px;  /* 섹션 */
  --radius-lg: 16px;  /* 큰 카드 */
  --radius-md: 12px;  /* 작은 요소 */
  
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* 폰트 정의 */
  --font-main: "Plus Jakarta Sans", "Pretendard", "Noto Sans KR", sans-serif;
  --font-heading: "Plus Jakarta Sans", "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  background: 
    radial-gradient(circle at 10% 0%, #f1f5f9 0%, transparent 40%),
    radial-gradient(circle at 90% 100%, #f8fafc 0%, transparent 40%),
    #ffffff;
  padding: 24px clamp(14px, 3vw, 34px) 80px;
  line-height: 1.6;
  letter-spacing: -0.02em; /* 전체 자간을 줄여서 단단한 느낌 부여 */
}

/* 다국어 지원 (Multilingual Support) */
[class*="lang-"] {
  display: none;
}

body[data-lang="ko"] .lang-ko {
  display: inline;
}

body[data-lang="en"] .lang-en {
  display: inline;
}

/* 블록 요소 대응 */
body[data-lang="ko"] h1.lang-ko,
body[data-lang="ko"] h2.lang-ko,
body[data-lang="ko"] h3.lang-ko,
body[data-lang="ko"] p.lang-ko,
body[data-lang="ko"] div.lang-ko {
  display: block;
}

body[data-lang="en"] h1.lang-en,
body[data-lang="en"] h2.lang-en,
body[data-lang="en"] h3.lang-en,
body[data-lang="en"] p.lang-en,
body[data-lang="en"] div.lang-en {
  display: block;
}

.lang-switch {
  display: flex;
  background: var(--surface-soft);
  padding: 4px;
  border-radius: 10px;
  gap: 2px;
  border: 1px solid var(--line);
}

.lang-switch button {
  border: 0;
  background: transparent;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-heading);
}

.lang-switch button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.site-header,
main {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.site-header {
  padding: 12px 18px;
  border-radius: 999px; /* 완전한 라운드 */
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: sticky;
  top: 14px;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.brand {
  font-family: var(--font-heading);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  z-index: 1001;
}

.brand-logo {
  display: block;
  flex-shrink: 0;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.site-nav a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.site-nav a.active {
  background: var(--text);
  color: #ffffff;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: var(--surface-soft);
  border-radius: 12px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border: 1px solid var(--line);
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 10px;
  transition: all 0.3s ease;
}

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

main {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.section[id] {
  scroll-margin-top: 100px;
}

.section,
.hero,
.final-cta {
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.section,
.final-cta {
  padding: clamp(24px, 4vw, 44px);
}

.hero {
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  gap: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -10%;
  right: -5%;
  width: 40%;
  height: 60%;
  background: radial-gradient(circle, rgba(225, 85, 42, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.eyebrow {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 800;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  max-width: 24ch;
  letter-spacing: -0.04em;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  max-width: 40ch;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 22px;
  border: 0;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  background: var(--text);
  color: #fff;
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: 999px;
}

.button.ghost {
  color: var(--text);
  background: var(--surface-soft);
}

.section-head {
  margin-bottom: 24px;
  display: grid;
  gap: 12px;
}

.feature-grid,
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.price-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.price-card,
.node-item,
.flow-list li {
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.card:hover, .price-card:hover {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.card,
.price-card {
  padding: 24px;
  display: grid;
  gap: 12px;
}

.card h3,
.price-card h3,
.flow-list h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.card p, .price-card p, .node-item span {
  font-size: 0.94rem;
  color: var(--muted);
}

.flow-list {
  list-style: none;
  display: grid;
  gap: 12px;
  position: relative;
}

.flow-list::before {
  content: "";
  position: absolute;
  left: 48px;
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--line) 0,
    var(--line) 10px,
    transparent 10px,
    transparent 20px
  );
  z-index: 0;
}

.flow-list li {
  padding: 24px;
  display: flex;
  gap: 24px;
  align-items: center;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  z-index: 1;
}

.flow-list li:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateX(8px);
}

.step {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--text);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  flex-shrink: 0;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.flow-list li:hover .step {
  background: var(--accent);
  transform: rotate(-10deg) scale(1.1);
}

.flow-content {
  display: grid;
  gap: 4px;
}

.flow-content h3 {
  font-size: 1.2rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-content p {
  font-size: 0.96rem;
  color: var(--muted);
}

.node-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.node-item {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.status-dot::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(3); opacity: 0; }
}

.node-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
}

.node-item strong {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
}

.node-item a {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  text-decoration: none;
  font-weight: 500;
  margin-left: 10px;
}

.node-item a:hover {
  text-decoration: underline;
}

.node-item span {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-heading);
  letter-spacing: -0.04em;
}

.price span {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}

.price-card.featured {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.price-card.featured .price {
  color: var(--accent);
}

.final-cta {
  display: grid;
  gap: 24px;
  justify-items: center;
  text-align: center;
  background: var(--text);
  color: #ffffff;
  border: 0;
}

.final-cta h2 {
  color: #ffffff;
  max-width: 100%;
}

.final-cta p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}

.final-cta .button.primary {
  background: #ffffff;
  color: var(--text);
  font-size: 1.05rem;
  padding: 14px 32px;
}

/* PWA 설치 유도 바 (Install Banner) */
.install-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--text);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  width: min(540px, calc(100% - 32px));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.install-banner.active {
  transform: translateX(-50%) translateY(0);
}

.install-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.install-content p {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0;
}

.install-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button.small {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 10px;
}

.close-btn {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.close-btn:hover {
  color: #ffffff;
}

/* 연락처 모달 (Contact Modal) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 41, 59, 0.85); /* 네이비 톤 어두운 배경 */
  backdrop-filter: blur(8px);
  display: none; /* 기본 숨김 */
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  background: var(--surface);
  padding: 8px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 100%;
  transform: translateY(20px);
  animation: slideUp 0.3s ease forwards;
}

.modal-content img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

@keyframes slideUp {
  to { transform: translateY(0); }
}

@media (max-width: 960px) {
  .site-header {
    border-radius: 20px;
    top: 10px;
    padding: 10px 14px;
  }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--surface);
    display: none;
    flex-direction: column;
    padding: 100px 24px 40px;
    z-index: 900;
    overflow-y: auto;
  }

  .site-nav.active {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .site-nav a {
    font-size: 1.25rem;
    padding: 20px;
    width: 100%;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    display: block;
    text-align: center;
  }

  .menu-toggle {
    display: flex;
  }

  .header-actions .button.secondary {
    display: none;
  }
  
  /* 헤더 언어 전환기는 모바일에서도 노출 */
  .header-actions .lang-switch {
    display: flex;
    margin-right: 4px;
  }

  /* 오버레이 메뉴 내부의 중복된 언어 전환기는 숨김 처리 (헤더에 있으므로) */
  .site-nav .lang-switch-mobile {
    display: none;
  }

  .feature-grid,
  .price-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    padding: 12px 12px 40px;
  }

  .node-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .node-item strong {
    min-width: unset;
  }

  .node-item span {
    margin-left: 0;
  }

  .flow-list li {
    flex-direction: column;
    gap: 12px;
  }

  .flow-list::before {
    left: 40px;
  }
  .step {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }
}
