/* ══════════════════════════════════════════
   과학탐험대 허브 페이지 — 메인 페이지 디자인 무드 통일
   ══════════════════════════════════════════ */

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

body {
  margin: 0;
  font-family: "Noto Sans KR", "SUIT Variable", sans-serif;
  background: #f5f7ff;
  color: #0f172a;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 파스텔 오로라 배경 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 5% 0%, rgba(99, 155, 255, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 95% 0%, rgba(168, 120, 255, 0.16) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 105%, rgba(52, 211, 153, 0.1) 0%, transparent 55%);
}

.page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ── 플로팅 네비 ── */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(calc(100% - 40px), 900px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px 10px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(200, 215, 255, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 4px 24px rgba(99, 120, 220, 0.1), inset 0 1px 0 rgba(255,255,255,0.9);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  flex-shrink: 0;
}

.nav-title strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.nav-title small {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-decoration: none;
  border: 1px solid rgba(200, 215, 255, 0.7);
  background: rgba(240, 245, 255, 0.6);
  transition: all 180ms ease;
}

.nav-back:hover {
  background: rgba(255,255,255,0.9);
  color: #2563eb;
  border-color: rgba(99, 130, 246, 0.3);
}

/* ── 컨테이너 ── */
.c {
  width: min(calc(100% - 40px), 900px);
  margin: 0 auto;
}

/* ── 히어로 ── */
.hero {
  padding: 120px 0 48px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(99,120,220,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,120,220,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 30%, transparent 80%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 7px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.09);
  border: 1px solid rgba(59, 130, 246, 0.2);
  font-size: 0.74rem;
  font-weight: 700;
  color: #2563eb;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 4.5vw, 2.9rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.hero h1 .grad {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 0.96rem;
  color: #64748b;
  line-height: 1.8;
  margin: 0;
  max-width: 500px;
}

/* ── 구분선 ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,120,220,0.15), transparent);
  margin: 36px 0 44px;
}

/* ── 단계 선택 라벨 ── */
.pick-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ── 단계 카드 그리드 ── */
.stage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-bottom: 80px;
}

/* ── 단계 카드 ── */
.stage-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(215, 228, 255, 0.9);
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 20px rgba(99, 120, 220, 0.07);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
  position: relative;
  backdrop-filter: blur(12px);
}

.stage-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 29px;
  z-index: -1;
  opacity: 0;
  transition: opacity 240ms ease;
}

.stage-card.stage-1::before {
  background: linear-gradient(135deg, rgba(37,99,235,0.6), rgba(124,58,237,0.5));
}

.stage-card.stage-2::before {
  background: linear-gradient(135deg, rgba(100,116,139,0.4), rgba(148,163,184,0.35));
}

.stage-card:not(.disabled):hover {
  transform: translateY(-7px);
  border-color: transparent;
  box-shadow: 0 18px 50px rgba(99, 120, 220, 0.18);
}

.stage-card:not(.disabled):hover::before {
  opacity: 0.55;
}

.stage-card.disabled {
  opacity: 0.58;
  cursor: default;
}

/* 카드 상단 비주얼 */
.stage-visual {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.stage-card.stage-1 .stage-visual {
  background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 60%, #d1fae5 100%);
}

.stage-card.stage-2 .stage-visual {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.stage-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.stage-card:not(.disabled):hover .stage-visual img {
  transform: scale(1.05);
}

.stage-visual-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.stage-visual-icon {
  font-size: 3.2rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(99,120,220,0.2));
}

.stage-visual-num {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(100, 116, 139, 0.5);
}

/* 카드 본문 */
.stage-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.stage-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  width: fit-content;
}

.stage-status.ready {
  background: rgba(16, 185, 129, 0.09);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.stage-status.preparing {
  background: rgba(100, 116, 139, 0.07);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.15);
}

.stage-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stage-desc {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.7;
  margin: 0 0 20px;
  flex: 1;
}

/* 태그 */
.stage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 20px;
}

.stage-tags span {
  font-size: 0.7rem;
  font-weight: 600;
  color: #059669;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 999px;
  padding: 3px 9px;
}

.stage-tags span.muted {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.07);
  border-color: rgba(148, 163, 184, 0.15);
}

/* 카드 하단 */
.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(215, 228, 255, 0.7);
}

.stage-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.stage-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  transition: all 200ms ease;
}

.stage-btn.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  box-shadow: 0 3px 14px rgba(37, 99, 235, 0.3);
}

.stage-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.45);
}

.stage-btn.inactive {
  background: #f1f5f9;
  color: #94a3b8;
  box-shadow: none;
  cursor: default;
  border: 1px solid #e2e8f0;
}

/* ── 반응형 ── */
@media (max-width: 700px) {
  .stage-grid { grid-template-columns: 1fr; }
  .hero { padding: 100px 0 36px; }
  .hero h1 { font-size: 1.7rem; }
  .nav-title { display: none; }
}
