@import url('https://fonts.googleapis.com/css2?family=Jua&display=swap');

/* ============================================================
   Reset & CSS 변수
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font:          'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg:            #ffffff;
  --bg-alt:        #f8f9fa;
  --text:          #1a1a1a;
  --text-muted:    #6c757d;
  --primary:       #3b5bdb;
  --primary-hover: #2f4ac7;
  --border:        #dee2e6;
  --shadow:        0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
  --radius:        10px;
  --header-h:      64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   레이아웃
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   헤더
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Jua', var(--font);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: .5px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   버튼
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 50px; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 16px;
  font-size: .85rem;
}
.btn-ghost:hover { background: var(--bg-alt); }

/* 소셜 로그인 버튼 */
.btn-social {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  gap: 12px;
}

.btn-naver  { background: #03C75A; color: #fff; }
.btn-naver:hover  { background: #02b350; }

.btn-kakao  { background: #FEE500; color: #191919; }
.btn-kakao:hover  { background: #fcd800; }

.btn-google { background: #fff; color: #3c4043; border: 1px solid #dadce0; }
.btn-google:hover { background: #f8f9fa; border-color: #c6c6c6; }

/* ============================================================
   인트로 밴드 (미니 히어로)
   ============================================================ */
.intro-band {
  background: linear-gradient(160deg, #eef2ff 0%, #fff 70%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.intro-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.intro-tag {
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.intro-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.5px;
  line-height: 1.35;
}
.intro-ctas {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ============================================================
   서비스 행 (SaaS 서비스 소개)
   ============================================================ */
.svc-row { padding: 56px 0; border-bottom: 1px solid var(--border); }
.svc-row-alt { background: #f8f9ff; }

.svc-row-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  gap: 48px;
}
.svc-row-reverse { direction: rtl; }
.svc-row-reverse > * { direction: ltr; }

/* 서비스 정보 */
.svc-icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.svc-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.svc-desc {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 18px;
}
.svc-link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap .15s;
}
.svc-link:hover { text-decoration: underline; }

/* 미니 플랜 카드 묶음 */
.svc-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.svc-plans-2 { grid-template-columns: repeat(2, 1fr); max-width: 440px; }

/* 미니 플랜 카드 */
.mini-card {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}
.mini-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.mini-card-highlight {
  border-color: var(--primary);
  box-shadow: 0 2px 16px rgba(59,91,219,.12);
}
.mini-card-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 100px;
  white-space: nowrap;
}
.mini-card-name {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.mini-card-highlight .mini-card-name { color: var(--primary); }
.mini-card-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}
.mini-card-price span {
  font-size: .75rem;
  font-weight: 400;
  color: var(--text-muted);
}
.mini-card-desc {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* 반응형 */
@media (max-width: 900px) {
  .svc-row-inner { grid-template-columns: 1fr; gap: 28px; }
  .svc-row-reverse { direction: ltr; }
  .svc-plans { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .intro-band-inner { flex-direction: column; align-items: flex-start; }
  .svc-plans { grid-template-columns: 1fr; }
  .svc-plans-2 { grid-template-columns: 1fr; max-width: 100%; }
}

/* ============================================================
   히어로 섹션
   ============================================================ */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  background: linear-gradient(160deg, #eef2ff 0%, #fff 60%);
}

.hero-title {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ============================================================
   피처 섹션
   ============================================================ */
.features { padding: 80px 0; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.feature-icon { font-size: 2rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p  { color: var(--text-muted); font-size: .875rem; line-height: 1.7; }

/* ============================================================
   CTA 섹션
   ============================================================ */
.cta-section {
  padding: 80px 0;
  background: var(--primary);
  color: #fff;
  text-align: center;
}
.cta-section h2 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.cta-section p  { color: rgba(255,255,255,.8); margin-bottom: 28px; }
.cta-section .btn-primary { background: #fff; color: var(--primary); }
.cta-section .btn-primary:hover { background: #eef2ff; }

/* ============================================================
   요금제 페이지
   ============================================================ */
.pricing-section {
  padding: 72px 0;
  background: var(--bg);
}
.pricing-section-alt {
  background: #f5f7ff;
}

/* 섹션 헤더 */
.pricing-section-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}
.pricing-section-num {
  font-family: 'Jua', var(--font);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--primary);
  opacity: .18;
  flex-shrink: 0;
  margin-top: -4px;
}
.pricing-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.pricing-section-desc {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* 카드 그리드 */
.pricing-grid {
  display: grid;
  gap: 20px;
}
.pricing-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pricing-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }

/* 카드 */
.pricing-card {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow .2s, transform .2s;
}
.pricing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.pricing-card-featured {
  border-color: var(--primary);
  box-shadow: 0 4px 24px rgba(59,91,219,.14);
}

/* 배지 */
.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

/* 플랜명 */
.pricing-plan-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
}
.pricing-card-featured .pricing-plan-name { color: var(--primary); }

/* 가격 */
.pricing-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}
.pricing-price {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.pricing-unit {
  font-size: .9rem;
  color: var(--text-muted);
}
.pricing-price-note {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* 기능 목록 */
.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  flex: 1;
}
.pricing-features li {
  font-size: .875rem;
  color: var(--text);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}
.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* 아웃라인 버튼 */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef2ff;
}

/* 월간/연간 토글 */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
}
.toggle-label {
  font-size: .9rem;
  color: var(--text-muted);
  transition: font-weight .15s;
}
#lbl-monthly { font-weight: 700; color: var(--text); }

.badge-save {
  display: inline-block;
  background: #d3f9d8;
  color: #2f9e44;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 4px;
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input { display: none; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-track { background: var(--primary); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(24px); }

/* 반응형 */
@media (max-width: 768px) {
  .pricing-grid-3 { grid-template-columns: 1fr; }
  .pricing-grid-2 { grid-template-columns: 1fr; }
  .pricing-section-header { flex-direction: column; gap: 8px; }
  .pricing-section-num { font-size: 2rem; }
}

/* ============================================================
   푸터
   ============================================================ */
.site-footer {
  padding: 32px 0;
  background: #111;
  color: rgba(255,255,255,.5);
  text-align: center;
  font-size: .85rem;
}

/* ============================================================
   로그인 페이지
   ============================================================ */
.login-hero {
  min-height: calc(100vh - var(--header-h) - 80px);
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #eef2ff 0%, #fff 60%);
  padding: 60px 0;
}

.login-hero .container {
  display: flex;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 24px;
}

.login-terms {
  font-size: .775rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.login-terms a { color: var(--primary); text-decoration: underline; }

/* 소셜 아이콘 공통 */
.social-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ============================================================
   폼 공통
   ============================================================ */
.login-form { width: 100%; }

/* 로그인 폼만 간격 좁힘 */
.login-form .form-group { margin-bottom: 8px; }
.login-form .form-error-msg { min-height: 0; }

.form-group {
  width: 100%;
  margin-bottom: 14px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  display: block;
  font-size: .825rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.required { color: #e03131; }

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .9rem;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,91,219,.1);
}
.form-input::placeholder { color: #b0b8c1; }
.form-input.is-error { border-color: #e03131; }

.form-error-msg {
  display: block;
  font-size: .775rem;
  color: #e03131;
  margin-top: 4px;
  min-height: 1rem;
}

.btn-full { width: 100%; padding: 13px; font-size: .95rem; }

/* 구분선 */
.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 20px 0 16px;
  color: var(--text-muted);
  font-size: .8rem;
  white-space: nowrap;
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* 하단 링크 */
.auth-footer-link {
  margin-top: 20px;
  font-size: .875rem;
  color: var(--text-muted);
}
.auth-footer-link a {
  color: var(--primary);
  font-weight: 600;
}
.auth-footer-link a:hover { text-decoration: underline; }

/* CAPTCHA */
.captcha-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-canvas {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  display: block;
  user-select: none;
}

.captcha-refresh {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  width: 40px;
  height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--primary);
  transition: background .15s;
  flex-shrink: 0;
}
.captcha-refresh:hover { background: #eef2ff; }

/* 회원가입 카드 (폼이 더 길어서 max-width 확대) */
.signup-card { max-width: 480px; }

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ============================================================
   온즈에듀 페이지
   ============================================================ */
.members-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-placeholder {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-user-name { font-size: .875rem; font-weight: 500; }

.members-welcome {
  background: linear-gradient(135deg, #3b5bdb 0%, #6741d9 100%);
  color: #fff;
  padding: 44px 0;
}
.members-welcome h2 { font-size: 1.55rem; font-weight: 700; margin-bottom: 6px; }
.members-welcome p  { color: rgba(255,255,255,.8); font-size: .95rem; }

.members-content { padding: 60px 0; }

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.content-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}
.content-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.content-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--t-from), var(--t-to));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}

.content-card-body { padding: 16px; }

.content-tag {
  display: inline-block;
  padding: 2px 10px;
  background: #eef2ff;
  color: var(--primary);
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.content-card h3 {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}

.content-card p {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  color: var(--text-muted);
}

/* ============================================================
   토스트
   ============================================================ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #1a1a1a;
  color: #fff;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: .875rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   반응형 — 태블릿 이하
   ============================================================ */
@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .content-grid  { grid-template-columns: 1fr; gap: 14px; }

  .hero { padding: 60px 0 48px; }
  .features, .cta-section { padding: 56px 0; }
  .members-content { padding: 40px 0; }
  .members-welcome { padding: 32px 0; }
  .members-welcome h2 { font-size: 1.3rem; }

  .login-card { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .hero-title  { font-size: 1.75rem; }
  .cta-section h2 { font-size: 1.5rem; }
}
