@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* ── 리셋 & 기본 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Pretendard', 'Malgun Gothic', sans-serif; color: #222; background: #fff; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
select, input, textarea { font-family: inherit; }

:root {
  --blue-dark:  #0a1f44;
  --blue-main:  #0d3b8e;
  --blue-mid:   #1a5ec4;
  --white:      #ffffff;
  --gray-light: #f4f7fb;
  --gray-mid:   #dde4ef;
  --text-dark:  #0a1628;
  --text-gray:  #555;
  --htj-blue:   #052b69;
}

/* ── 헤더 ── */
#site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.header-inner {
  max-width: 760px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
/* 로고 */
.logo a { display: flex; flex-direction: column; line-height: 1.2; }
.logo-name { font-size: 1.45rem; font-weight: 800; color: var(--blue-main); }
.logo-sub  { font-size: 0.78rem; color: var(--text-gray); }

/* PC 메뉴 */
.gnav ul { list-style: none; display: flex; gap: 4px; }
.gnav ul li a {
  display: block; padding: 8px 14px; border-radius: 30px;
  font-size: 1rem; font-weight: 600; color: var(--text-dark);
  transition: background .2s, color .2s; white-space: nowrap;
}
.gnav ul li a:hover, .gnav ul li.active a {
  background: var(--blue-main); color: var(--white);
}

/* 햄버거 버튼 */
.mobile-menu-btn {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 44px; height: 44px; padding: 4px;
  background: none; border: none; cursor: pointer; flex-shrink: 0;
  position: relative; z-index: 201;
  -webkit-tap-highlight-color: transparent;
}

/* ── 드로어 (모바일 슬라이드 메뉴) ── */
.drawer-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 300;
}
.drawer-overlay.open { display: block; }

.drawer {
  position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
  background: var(--blue-dark); z-index: 400;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.3);
  visibility: hidden;
}
.drawer.open { right: 0; visibility: visible; }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.drawer-title {
  font-size: 0.9rem; font-weight: 700;
  color: rgba(255,255,255,.85); line-height: 1.4;
}
.drawer-close {
  background: none; border: none; color: rgba(255,255,255,.7);
  font-size: 1.2rem; cursor: pointer; padding: 4px 8px; transition: color .2s;
}
.drawer-close:hover { color: var(--white); }

.drawer-menu { list-style: none; padding: 12px 0; flex: 1; overflow-y: auto; }
.drawer-menu li a {
  display: block; padding: 15px 24px;
  font-size: 1rem; font-weight: 600;
  color: rgba(255,255,255,.8);
  transition: background .2s, color .2s;
  border-left: 3px solid transparent;
}
.drawer-menu li a:hover,
.drawer-menu li.active a {
  background: rgba(255,255,255,.08);
  color: var(--white);
  border-left-color: #4a90e2;
}

/* ── 히어로 ── */
.hero {
  background: linear-gradient(135deg, #0a1f44 0%, #0d3b8e 100%);
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,.03) 0px,
    rgba(255,255,255,.03) 1px,
    transparent 1px,
    transparent 12px
  );
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero-inner {
  max-width: 760px; margin: 0 auto;
  position: relative;
}
.hero-img {
  width: 100%;
  display: block;
}
.hero-img img {
  width: 100%; height: auto;
  display: block;
}
.hero-text {
  position: absolute;
  top: 12%; left: 22%;
  z-index: 2;
}
.hero-line {
  font-size: 1.05rem; font-weight: 700;
  color: #1a3a6e;
  line-height: 1.85;
}
.hero-line strong {
  font-weight: 900;
  color: #1a3a6e;
}


/* ── 메뉴 카드 ── */
.menu-cards { padding: 40px 20px; }
.cards-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.menu-card {
  display: block; position: relative;
  border-radius: 14px; padding: 28px 30px; color: var(--white);
  transition: transform .2s, box-shadow .2s;
  background: linear-gradient(135deg, #0a1f44 0%, #0d3b8e 100%);
  overflow: hidden;
  position: relative;  
}
.menu-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26,94,196,.35); }
.card-num { font-size: 0.85rem; font-weight: 700; color: #f0c040; display: block; margin-bottom: 6px; }
.card-tag {
  position: absolute; top: 20px; right: 22px;
  font-size: 0.75rem; color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.25); border-radius: 20px; padding: 2px 10px;
}
.card-title { font-size: 1.25rem; font-weight: 800; }

/* ── 페이지 히어로 ── */
.page-hero {
  background: linear-gradient(135deg, #0a1f44 0%, #0d3b8e 100%);
  padding: 20px 20px 24px;
  position: relative;
  overflow: hidden;
}
/* 대각선 패턴 */
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,.03) 0px,
    rgba(255,255,255,.03) 1px,
    transparent 2px,
    transparent 12px
  );
  z-index: 0;
}
/* 빛 번짐 */
.page-hero::after {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(74,144,226,.25) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}
.page-hero-inner {
  max-width: 760px; margin: 0 auto;
  position: relative; z-index: 1;
}
.page-label { font-size: 0.85rem; color: rgba(255,255,255,.7); margin-bottom: 22px; font-weight: 500; }
.page-title { font-size: 2.8rem; font-weight: 700; color: var(--white); line-height: 1.3; margin-bottom: 22px; }
.page-title .ht-name { color: #facc15; }
.page-desc { font-size: 0.95rem; color: rgba(255,255,255,.85); }

/* ── 폼 섹션 ── */
.form-section { padding: 40px 20px 60px; }
.form-wrap { max-width: 760px; margin: 0 auto; }
.form-notice { background: #e8f1fc; border-radius: 8px; padding: 14px 18px; font-size: 1.1rem; color: var(--blue-dark); margin-bottom: 28px; font-weight: 700;text-align:center; }
.form-error { background: #fdecea; border-radius: 8px; padding: 12px 18px; color: #c0392b; font-size: 0.9rem; margin-bottom: 16px; }
.form-row { margin-bottom: 20px; }
.form-row-half { display: flex; gap: 16px; }
.form-col { flex: 1; }
.form-label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.req { color: var(--blue-main); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--gray-mid); border-radius: 8px;
  font-size: 0.95rem; background: var(--white); transition: border-color .2s;
  appearance: none; -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--blue-main); box-shadow: 0 0 0 3px rgba(26,94,196,.12);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.form-textarea { resize: vertical; min-height: 130px; }
.form-submit { text-align: center; margin-top: 32px; }

.privacy-box { background: var(--gray-light); border: 1px solid var(--gray-mid); border-radius: 8px; padding: 16px 18px; margin-bottom: 20px; font-size: 0.85rem; color: var(--text-gray); line-height: 1.7; }
.privacy-box strong { color: var(--text-dark); display: block; margin-bottom: 6px; }
.privacy-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.9rem; font-weight: 600; color: var(--text-dark); cursor: pointer; }
.privacy-check input { width: 18px; height: 18px; accent-color: var(--blue-main); cursor: pointer; }

/* ── 버튼 ── */
.btn-primary {
  display: inline-block; background: var(--blue-main); color: var(--white);
  padding: 13px 36px; border-radius: 30px; font-size: 1rem; font-weight: 700;
  transition: background .2s, transform .15s; border: none;
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn-primary.btn-lg { padding: 15px 48px; font-size: 1.05rem; }
.btn-cancel {
  display: inline-block; background: #eee; color: #555;
  padding: 13px 32px; border-radius: 30px; font-size: 1rem; font-weight: 600;
  transition: background .2s; border: none;
}
.btn-cancel:hover { background: #ddd; }
.btn-upload {
  display: flex; align-items: center; gap: 8px;
  background: var(--blue-main); color: var(--white);
  padding: 13px 32px; border-radius: 30px; font-size: 1rem; font-weight: 700;
  cursor: pointer; margin: 20px auto 12px; transition: background .2s;
  width: fit-content;
}
.btn-upload:hover { background: var(--blue-dark); }

/* ── 결과 박스 ── */
.result-box { text-align: center; padding: 50px 20px; }
.result-icon { font-size: 2.5rem; color: var(--blue-main); margin-bottom: 12px; }
.result-title { font-size: 1.4rem; font-weight: 800; color: var(--text-dark); margin-bottom: 10px; }
.result-desc { font-size: 0.95rem; color: var(--text-gray); margin-bottom: 28px; }

/* ── 프로필 섹션 ── */
.profile-section { padding: 40px 20px 60px; }
.profile-wrap { max-width: 600px; margin: 0 auto; }
.profile-step { background: var(--white); border-radius: 16px; padding: 30px 28px; box-shadow: 0 4px 20px rgba(0,0,0,.07); }
.step-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue-main); color: var(--white);
  font-size: 1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step-title { font-size: 1.1rem; font-weight: 800; color: var(--text-dark); }

.frame-tabs { display: flex; gap: 10px; margin-bottom: 20px; justify-content: center; }
.frame-tab {
  padding: 8px 24px; border-radius: 30px; font-size: 0.95rem; font-weight: 600;
  border: 2px solid var(--gray-mid); color: var(--text-gray); transition: .2s;
}
.frame-tab.active { background: var(--blue-main); color: var(--white); border-color: var(--blue-main); }

.frame-preview-box { margin-bottom: 16px; }
.frame-sample {
  width: 100%; max-width: 380px; margin: 0 auto;
  aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: var(--gray-light);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.frame-sample img { width: 100%; height: 100%; object-fit: cover; }
.frame-sample.no-img img { display: none; }
.no-img-text { display: none; font-size: 0.9rem; color: var(--text-gray); text-align: center; }
.frame-sample.no-img .no-img-text { display: block; }

.step-guide { font-size: 0.85rem; color: var(--text-gray); margin-top: 10px; text-align: center; }
.step-guide.small { font-size: 0.8rem; color: #999; }

/* 글자색 선택 */
.color-picker-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 12px 0;
  flex-wrap: wrap;
}
.color-picker-label {
  font-size: 0.9rem; font-weight: 600; color: var(--text-dark);
}
.color-swatches { display: flex; gap: 8px; }
.swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s;
}
.swatch:hover { transform: scale(1.2); }
.swatch.active { border: 2px solid var(--blue-main); transform: scale(1.15); }
#colorPicker {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--gray-mid); cursor: pointer;
  padding: 0; background: none;
}

/* ── 모달 ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.55); align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white); border-radius: 20px;
  width: 100%; max-width: 420px;
  padding: 32px 28px; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  max-height: 90vh; overflow-y: auto;
}
.modal-step-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.modal-step-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-main); color: var(--white);
  font-size: 1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.modal-step-title { font-size: 1.05rem; font-weight: 800; color: var(--text-dark); }

.modal-zoom-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-zoom-label { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.modal-zoom-slider { flex: 1; accent-color: var(--blue-main); }

.modal-canvas-wrap {
  width: 100%; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.1); margin-bottom: 16px;
  background: #eee;
}
#profileCanvas { width: 100%; height: auto; display: block; touch-action: none; }

.modal-guide {
  font-size: 1rem; font-weight: 700;
  color: #052b69; text-align: center;
  margin: 14px 0; line-height: 1.6;
}

.modal-frame-tabs { display: flex; gap: 10px; margin-bottom: 16px; }

.modal-btns { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }

/* ── 결과 캔버스 ── */
.result-canvas-wrap {
  width: 100%; max-width: 500px; margin: 0 auto 24px;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
#resultCanvas { width: 100%; height: auto; display: block; }
.editor-btns { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ── 푸터 ── */
#site-footer { background: var(--text-dark); color: rgba(255,255,255,.6); text-align: center; padding: 28px 20px; }
.footer-site { font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.footer-copy { font-size: 0.82rem; }

/* ── 반응형 ── */
@media (max-width: 768px) {
  .gnav { display: none; }
  .mobile-menu-btn { display: flex; }
  #site-header { position: sticky; top: 0; }
  .page-hero { padding: 24px 20px 20px; }
  .hero-inner { min-height: auto; }
  .hero-img { width: 100%; }
  .hero-img img { object-position: center 20%; }


  /* 텍스트를 이미지 위에 오버레이 */
  .hero-text {
    position: absolute;
    top: 10%; left: 18%;
    padding: 0;
  }
  .hero-line {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;      /* ← 자간(줄간격) 조절 */
    letter-spacing: -0.3px; /* ← 글자 간격 조절 */
    color: #1a3a6e;
  }
  .hero-line strong {
    font-size: 0.95rem;
    letter-spacing: -0.3px;
  }
  .page-title { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .form-row-half { flex-direction: column; gap: 0; }
  .profile-step { padding: 22px 16px; }
  .modal-box { padding: 24px 16px; }
  .modal-btns { flex-direction: column; align-items: stretch; }
  .editor-btns { flex-direction: column; align-items: stretch; }
}

.color-picker-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 12px 0; flex-wrap: wrap;
}
.color-picker-label {
  font-size: 0.9rem; font-weight: 600; color: var(--text-dark);
}
.color-swatches { display: flex; gap: 8px; }
.swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s;
}
.swatch:hover { transform: scale(1.2); }
.swatch.active { border: 2px solid var(--blue-main); transform: scale(1.15); }
#colorPicker {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--gray-mid); cursor: pointer;
  padding: 0; background: none;
}

/* SCDream 히어로 텍스트 */
.hero-line.sc {
  font-family: 'SCDream', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.1;
  font-style: italic;
  transform: skewX(-1deg);
  color: #1a3a6e;
}
.hero-line.sc strong {
  font-family: 'SCDream', sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  color: #1a3a6e;
}
@media (max-width: 768px) {
  .hero-line.sc,
  .hero-line.sc strong { font-size: 1.0rem;line-height: 1.3;}
}

/* 홍보자료 본문 이미지 반응형 */
.media-content-box img {
  max-width: 100%;
  height: auto;
}

.region-group-wrap { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.region-group { display: flex; align-items: flex-start; gap: 10px; }
.region-group-label {
  min-width: 48px; padding: 6px 0; text-align: center;
  font-size: 0.78rem; font-weight: 800; color: #fff;
  background: var(--blue-dark); border-radius: 16px; line-height: 1.8;
  flex-shrink: 0; margin-top: 2px;
}
.region-group .region-grid { margin-top: 0; flex: 1; }