/* =========================================================================
   JMN — 디자인 시스템 (모던 다크 + 보라/청록 그라데이션)
   index.html, privacy.html, 404.html 에서 공통으로 사용
   ========================================================================= */

:root {
  --bg: #07070c;
  --bg-2: #0c0b16;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f4f7;
  --text-muted: #9a9aa8;
  --text-faint: #909099; /* WCAG AA: #07070c 배경 대비 4.5:1 이상 */

  --violet: #8b5cf6;
  --violet-light: #a78bfa;
  --cyan: #22d3ee;

  --grad: linear-gradient(120deg, #a78bfa 0%, #8b5cf6 38%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(139, 92, 246, 0.16), rgba(34, 211, 238, 0.12));

  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1080px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: rgba(139, 92, 246, 0.4); color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--violet);
  color: #fff;
  border-radius: 10px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--violet-light);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 배경 오브 (그라데이션 글로우) ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.orb--violet {
  width: 540px; height: 540px;
  top: -160px; left: -120px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.55), transparent 70%);
  animation: float-a 18s ease-in-out infinite;
}
.orb--cyan {
  width: 480px; height: 480px;
  top: 30%; right: -140px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.4), transparent 70%);
  animation: float-b 22s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 60px); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-50px, 40px); }
}

/* ---------- 브랜드 마크 ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--grad);
  color: #0a0a0f;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}
.brand__text {
  font-size: 19px;
  letter-spacing: 0.02em;
}

/* ---------- 네비게이션 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 7, 12, 0.6);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { color: var(--text-muted); font-size: 15px; font-weight: 500; transition: color 0.2s ease; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
  background: var(--surface-2);
}
.nav__cta:hover { border-color: var(--violet-light); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav__toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.25s ease; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile { display: none; flex-direction: column; padding: 8px 24px 20px; border-bottom: 1px solid var(--border); background: rgba(7, 7, 12, 0.92); }
.nav__mobile a { padding: 14px 4px; color: var(--text-muted); border-top: 1px solid var(--border); font-size: 16px; }
.nav__mobile a:first-child { border-top: none; }
.nav__mobile a:hover { color: var(--text); }

/* ---------- 공통 버튼 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad);
  color: #0a0a0f;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5); }
.btn--ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--violet-light); }
.btn--lg { padding: 16px 34px; font-size: 16px; }

/* ---------- HERO ---------- */
.hero { padding: clamp(72px, 14vh, 150px) 0 clamp(60px, 10vh, 110px); }
.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 30px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.badge__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.hero__title { margin: 0; line-height: 1; }
.hero__wordmark {
  display: inline-block;
  font-size: clamp(72px, 16vw, 168px);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 8px 40px rgba(139, 92, 246, 0.35));
}
.hero__slogan {
  margin: 18px 0 0;
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero__desc {
  margin: 22px 0 0;
  max-width: 560px;
  color: var(--text-muted);
  font-size: clamp(15px, 2.4vw, 17px);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 38px; }

/* ---------- 섹션 공통 ---------- */
.section { padding: clamp(64px, 11vh, 120px) 0; }
.section--contact { text-align: center; }

.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--cyan);
}
.section__title {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section__lead {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--text-muted);
  font-size: clamp(15px, 2.4vw, 17.5px);
}
.section--contact .section__lead { margin-left: auto; margin-right: auto; }

/* ---------- 카드 그리드 ---------- */
.cards {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  padding: 30px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.card__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  font-size: 22px;
  color: var(--violet-light);
  margin-bottom: 18px;
}
.card__title { margin: 0 0 8px; font-size: 19px; font-weight: 700; }
.card__body { margin: 0; color: var(--text-muted); font-size: 15px; }

/* ---------- COMING SOON ---------- */
.coming {
  position: relative;
  padding: clamp(40px, 7vw, 72px);
  border-radius: 28px;
  background: var(--grad-soft);
  border: 1px solid var(--border-strong);
  text-align: center;
  overflow: hidden;
}
.coming::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(139, 92, 246, 0.25), transparent 60%);
  pointer-events: none;
}
.coming > * { position: relative; }
.coming__title { margin: 0 0 16px; font-size: clamp(24px, 4.4vw, 38px); font-weight: 800; letter-spacing: -0.03em; }
.coming__body { margin: 0 auto 32px; max-width: 540px; color: var(--text-muted); font-size: clamp(15px, 2.4vw, 17px); }
.coming__progress {
  max-width: 320px;
  margin: 0 auto 32px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.coming__bar {
  display: block;
  height: 100%;
  width: 55%;
  border-radius: 999px;
  background: var(--grad);
  animation: progress 3.2s ease-in-out infinite alternate;
}
@keyframes progress {
  from { width: 35%; }
  to { width: 72%; }
}

/* ---------- CONTACT ---------- */
.contact { display: flex; flex-direction: column; align-items: center; }
.contact .btn { margin-top: 36px; }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--border); padding: 44px 0; margin-top: 40px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__links a { color: var(--text-muted); font-size: 14.5px; transition: color 0.2s ease; }
.footer__links a:hover { color: var(--text); }
.footer__copy { width: 100%; margin: 6px 0 0; color: var(--text-faint); font-size: 13.5px; }

/* ---------- 법률 문서 페이지 (privacy) ---------- */
.legal { padding: clamp(60px, 10vh, 110px) 0; }
.legal__doc { max-width: 760px; margin: 0 auto; }
.legal__back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px; color: var(--text-muted); font-size: 14.5px; }
.legal__back:hover { color: var(--text); }
.legal h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 10px; }
.legal__meta { color: var(--text-faint); font-size: 14px; margin: 0 0 40px; }
.legal h2 { font-size: 20px; font-weight: 700; margin: 40px 0 12px; letter-spacing: -0.02em; }
.legal p, .legal li { color: var(--text-muted); font-size: 15.5px; }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--violet-light); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 24px; }
.notfound__code {
  font-size: clamp(80px, 20vw, 160px);
  font-weight: 900;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.notfound h1 { color: var(--text-muted); margin: 16px 0 32px; font-size: 17px; font-weight: 500; }

/* ---------- 등장 애니메이션 ----------
   .js 클래스(인라인 스크립트가 추가)가 있을 때만 초기 숨김 처리.
   JS가 없거나 실패하면 콘텐츠가 항상 그대로 보임 → 안전. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 반응형 ---------- */
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__mobile[data-open="true"] { display: flex; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .br-desktop { display: none; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- 접근성: 모션 최소화 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
