:root {
  --color-primary: #2D6EFF;
  --color-primary-tint: #EEF4FF;
  --color-primary-shade: #2963E5;
  --color-secondary: #FF7B4B;
  --color-secondary-tint: #FFEFE9;
  --gray-100: #111111;
  --gray-80: #585858;
  --gray-60: #888888;
  --gray-40: #AAAAAA;
  --gray-20: #CCCCCC;
  --gray-10: #EEEEEE;
  --gray-5: #F5F5F5;
  --gray-0: #FFFFFF;
  --grad-primary: linear-gradient(135deg, #2D6EFF 0%, #6A9CFF 60%, #92B4FF 100%);
  --grad-accent: linear-gradient(135deg, #FF7B4B 0%, #FF9F7A 50%, #FFC2A8 100%);
}

@font-face {
  font-family: 'Pretendard';
  src: url('../assets/fonts/Pretendard-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Pretendard';
  src: url('../assets/fonts/Pretendard-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Pretendard', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-100);
  background: var(--gray-0);
  /* 가능한 브라우저에서 스크롤바가 영역을 차지하지 않도록 오버레이 시도 (비표준, 안전한 폴백 존재) */
  overflow-y: overlay;
  line-height: 1.4;
}

/* 심플한 스크롤바 디자인 - WebKit 계열 (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
  width: 10px; /* 얇은 폭 */
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent; /* 배경 제거 */
}
*::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.22); /* 은은한 썸 */
  border-radius: 999px;
  border: 2px solid transparent; /* 트랙과 간격 느낌 */
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0,0,0,0.32);
}

/* Firefox */
* {
  scrollbar-width: thin; /* 얇게 */
  scrollbar-color: rgba(0,0,0,0.35) transparent; /* 썸/트랙 */
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: transform .08s ease-in-out, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 6px 14px rgba(45, 110, 255, 0.18);
  line-height: 1.4;
}
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0); }
.btn-sm { height: 42px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 16px; }
.btn-primary { background: var(--grad-primary); color: #fff; }
.btn-primary:hover { filter: brightness(0.98); box-shadow: 0 8px 16px rgba(45,110,255,0.22); }
.btn-secondary { background: var(--color-secondary-tint); color: var(--color-secondary); }
.btn-secondary:hover { background: #ffe5db; }

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--gray-10);
}
.nav-inner {
  display: flex;
  height: 80px;
  align-items: center;
  justify-content: space-between;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--gray-0); text-decoration: none; font-weight: 600; }
.nav-links a:hover { color: var(--color-primary); }

/* 언어 선택 셀렉트 */
.lang-select {
  height: 42px;
  padding: 0 36px 0 12px;
  border-radius: 12px;
  border: 1px solid var(--gray-10);
  background:
    url('./images/chevron_down.svg') no-repeat right 12px center / 24px,
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  backdrop-filter: saturate(120%) blur(6px);
  color: var(--gray-100);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.lang-select:hover { border-color: var(--gray-20); }
.lang-select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); }
.lang-select:active { transform: translateY(0); }
.lang-select option { color: var(--gray-100); }

/* Custom Select (accessible, matches site style) */
.custom-select { position: relative; }
.custom-select .select-trigger {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 8px 0 12px;
  border-radius: 12px; border: 1px solid var(--gray-10);
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  backdrop-filter: saturate(120%) blur(6px);
  color: var(--gray-100); font-weight: 700; font-size: 14px; line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.custom-select .select-trigger:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); }
.custom-select .select-caret { width: 24px; height: 24px; background: url('./images/chevron_down.svg') no-repeat center / 24px; }
.custom-select .select-options {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(10px);
  border: 1px solid var(--gray-10); border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  display: none; /* opened by JS */
}
.custom-select.open .select-options { display: block; }
.custom-select .select-options li {
  list-style: none; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  font-weight: 600; color: var(--gray-100);
}
.custom-select .select-options li[aria-selected="true"],
.custom-select .select-options li:hover { background: var(--color-primary-tint); color: var(--color-primary); }

.hero {
  padding: 140px 0 80px;
  position: relative;
  background:
    radial-gradient(1800px 900px at 10% -20%, rgba(45,110,255,0.10), transparent 68%),
    radial-gradient(1600px 900px at 90% -30%, rgba(255,123,75,0.08), transparent 68%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.86));
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}
.hero-copy h1 {
  font-size: 56px;
  line-height: 1.4;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #111, #2D6EFF 40%, #FF7B4B 85%);
  background-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent; /* Safari */
}
.hero-copy .subtitle { color: var(--gray-80); font-size: 22px; margin: 0 0 60px; }
.hero .cta { display: flex; gap: 16px; margin: 14px 0 18px; }
.hero .cta .icon { display: inline-flex; margin-right: 8px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  position: relative;
  background: #fff;
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px; color: var(--gray-80); font-weight: 600;
  background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, rgba(45,110,255,.6), rgba(255,123,75,.6));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.hero-visual img { width: 100%; border-radius: 16px; box-shadow: 0 10px 24px rgba(0,0,0,.08); }

/* Hero carousel */
.hero-carousel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(120% 80% at 70% 0%, rgba(45,110,255,0.18), transparent 60%),
              radial-gradient(140% 100% at 0% 100%, rgba(255,123,75,0.16), transparent 60%),
              linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.35));
  backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 24px 56px rgba(0,0,0,0.12);
}
.hero-carousel .carousel-bg {
  position: absolute; inset: -20% -20%;
  background: radial-gradient(800px 400px at 10% 10%, rgba(255,255,255,0.35), transparent 60%),
              radial-gradient(700px 500px at 80% 90%, rgba(146,180,255,0.25), transparent 60%);
  filter: blur(24px);
  z-index: 0;
}
.carousel-track {
  position: relative;
  display: block; /* 겹쳐서 페이드 전환 */
  width: 100%;
  height: clamp(360px, 42vw, 640px);
  z-index: 1;
}
.carousel-slide {
  position: absolute; inset: 0;
  display: grid;
  place-items: center;
  padding: 12px 20px;
  opacity: 0;
  transform: scale(0.90);
  transition: opacity .6s ease, transform .6s ease;
  z-index: 0;
  pointer-events: none;
}
.carousel-slide.is-active { opacity: 1; transform: scale(1); z-index: 1; pointer-events: auto; }
.carousel-slide img {
  display: block;
  max-width: min(380px, 82%);
  width: auto;
  height: auto;
  max-height: calc(100% - 56px); /* 상하 여백 고려 */
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18), 0 2px 12px rgba(45,110,255,0.18);
}
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.7);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  cursor: pointer;
  z-index: 3; /* 슬라이드(1)와 도트(2) 위에 위치 */
}
.carousel-nav.prev { left: 12px; }
.carousel-nav.next { right: 12px; }
.carousel-nav::before {
  content: '';
  display: block; margin: auto; width: 10px; height: 10px; border-top: 2px solid #111; border-right: 2px solid #111;
}
.carousel-nav.prev::before { transform: rotate(-135deg); }
.carousel-nav.next::before { transform: rotate(45deg); }
.carousel-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 2;
}
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 999px; border: none; padding: 0; cursor: pointer;
  background: rgba(17,17,17,0.25);
}
.carousel-dots button.is-active { background: #111; }

@media (max-width: 560px) {
  .carousel-track { height: clamp(480px, 70vw, 560px); }
  .carousel-slide img { max-width: min(320px, 88%); max-height: calc(100% - 48px); border-radius: 20px; }
  .carousel-nav { display: none; }
}

.section { padding: 96px 0; }
.section-alt { background: var(--gray-5); }
.section-title { font-size: 36px; margin: 0 0 32px; letter-spacing: -0.01em; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card { background: #fff; border: 1px solid var(--gray-10); border-radius: 18px; padding: 22px; transition: transform .18s ease, box-shadow .18s ease; }
.card img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; border-radius: 12px; border: 1px solid var(--gray-10); }
.card h3 { margin: 12px 0 6px; font-size: 22px; }
.card p { margin: 0; color: var(--gray-80); font-size: 16px; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.08); }

.flow .steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.steps li { display: flex; gap: 16px; padding: 22px; background: #fff; border: 1px solid var(--gray-10); border-radius: 14px; }
.step-no { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: var(--color-primary-tint); color: var(--color-primary); font-weight: 700; }
.steps strong { display: block; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--gray-80); font-size: 16px; }

.pricing-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.plan-card {
  background: #fff; border: 1px solid var(--gray-10); border-radius: 18px; padding: 22px;
  box-shadow: 0 12px 30px rgba(0,0,0,.05);
}
.plan-card--free {
  background: linear-gradient(180deg, rgba(255,239,233,0.60), rgba(255,239,233,0.40));
  border-color: rgba(255,123,75,0.12);
}
.plan-card--pro {
  background: linear-gradient(180deg, rgba(238,244,255,0.60), rgba(238,244,255,0.40));
  border-color: rgba(45,110,255,0.12);
}
.plan-header { margin-bottom: 12px; }
.plan-title { margin: 0 0 6px; font-size: 20px; }
.plan-sub { margin: 0 0 10px; color: var(--gray-80); }
.plan-price { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.feature-list { margin: 12px 0 16px; padding-left: 18px; }
.feature-list li { margin: 6px 0; color: var(--gray-80); }
.plan-cta { display: flex; }
.pricing .plan-cta .btn {
  background: var(--gray-100) !important;
  color: #fff !important;
  box-shadow: none !important;
  filter: none !important;
}
.pricing .plan-cta .btn:hover { background: var(--gray-100) !important; color: #fff !important; }

/* Pricing section background */
#pricing { background: radial-gradient(1200px 800px at 50% -30%, rgba(146,180,255,0.08), transparent 68%), radial-gradient(1000px 700px at 10% 120%, rgba(255,123,75,0.05), transparent 68%); }

@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

.footer { border-top: 1px solid var(--gray-10); background: #fff; }
.footer-inner { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 80px; }
.footer-left { display: flex; gap: 12px; align-items: center; }
.footer-left p { margin: 0; color: var(--gray-60); font-size: 15px; }
.footer-links { display: flex; gap: 12px; }
.footer-links a { color: var(--gray-80); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--color-primary); }

/* Anchor offset for sticky header */
.hero, .section, #top { scroll-margin-top: 84px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: grid;
  place-items: center;
  z-index: 9999; /* 메뉴바(헤더)보다 항상 위 */
}
.modal {
  background: #fff;
  border: 1px solid var(--gray-10);
  border-radius: 16px;
  padding: 20px;
  width: min(420px, calc(100% - 40px));
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.modal h3 { margin: 0 0 10px; }
.modal p { margin: 0 0 14px; color: var(--gray-80); }
.modal #modal-close { width: 100%; }

/* hidden 속성 보장을 위한 안전망 */
[hidden] { display: none !important; }

/* Store buttons (from figma reference) */
.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
}
.store-btn:hover, .store-btn:focus, .store-btn:active { text-decoration: none; }
.store-btn .icon { display: inline-flex; }
.store-btn--appstore:hover,
.store-btn--playstore:hover { transform: translateY(-1px); }

@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .flow .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .pricing .pricing-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { padding-top: 120px; }
  .hero-copy h1 { font-size: 32px; }
  .hero .cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .nav-links { display: flex; gap: 10px; }
  .nav-links a { display: none; }
  .nav-links .btn { display: none; }
  .nav-links .lang-select { display: inline-flex; }
  .flow .steps { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 32px; }
  .footer-left { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { flex-direction: column; gap: 12px; }
  .footer { padding: 24px 0; }
}


