/* ========== Reset & Base ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #f7f8fc;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4ff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --primary: #6366f1;
  --primary-2: #4f46e5;
  --accent: #06b6d4;
  --gold: #d97706;
  --success: #10b981;
  --tg: #2aabee;
  --tg-dark: #229ed9;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 32px rgba(99, 102, 241, 0.12);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --header-h: 56px;
}

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

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: calc(88px + var(--safe-b));
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; cursor: pointer; background: none; }
ul { list-style: none; }

/* ========== Background Effects ========== */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.bg-glow-1 {
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
  top: -100px; left: -80px;
}
.bg-glow-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.28) 0%, transparent 70%);
  bottom: 15%; right: -100px;
  opacity: 0.4;
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 15%, transparent 75%);
}

header, main, footer {
  position: relative;
  z-index: 1;
}

/* ========== Header ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.header-inner {
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo-icon { font-size: 20px; }
.logo-text em {
  font-style: normal;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.header-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  animation: badgePulse 2.4s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

/* ========== Layout ========== */
main {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  text-align: center;
  color: var(--text);
}

/* ========== Hero ========== */
.hero {
  text-align: center;
  padding: 24px 0 12px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text);
}
.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 50%, #10b981 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}
.hero-sub strong {
  color: var(--gold);
  font-weight: 800;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  box-shadow: var(--shadow);
}
.stat-value {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 2px;
}
.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

/* ========== CTA Buttons ========== */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  height: 54px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
  position: relative;
  overflow: hidden;
}
.cta-btn.primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}
.cta-btn.primary:active {
  transform: scale(0.97);
}
.cta-btn.secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--primary-2);
  max-width: 280px;
  box-shadow: var(--shadow);
}
.cta-btn.secondary:active { transform: scale(0.97); }

.cta-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ========== Features ========== */
.features {
  padding: 8px 0 32px;
}
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.feature-card:active {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.1));
  border-radius: 12px;
}
.feature-body h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.feature-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========== Plans ========== */
.plans {
  padding: 8px 0 32px;
}
.plan-scroll {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.plan-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 6px;
  text-align: center;
  box-shadow: var(--shadow);
}
.plan-card.highlight {
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.08));
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}
.plan-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
}
.plan-days {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 2px;
  color: var(--text);
}
.plan-rate {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.plan-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}
.plan-card.highlight .plan-pct {
  color: var(--gold);
  font-size: 14px;
}

/* ========== Referral ========== */
.referral {
  padding: 8px 0 32px;
}
.ref-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.ref-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.ref-pct {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}
.ref-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.ref-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

/* ========== Managers ========== */
.managers {
  padding: 8px 0 36px;
}
.managers-head {
  margin-bottom: 4px;
}
.managers-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: -8px 0 20px;
}

.manager-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manager-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, background 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.manager-card:hover,
.manager-card:focus-visible {
  background: var(--bg-card-hover);
  border-color: rgba(42, 171, 238, 0.45);
  box-shadow: 0 6px 28px rgba(42, 171, 238, 0.15);
  outline: none;
}
.manager-card:active {
  transform: scale(0.98);
}

.manager-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.manager-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  background: #f1f5f9;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.manager-online {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: var(--success);
  border: 2.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.manager-info {
  flex: 1;
  min-width: 0;
}
.manager-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
  color: var(--text);
}
.manager-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.manager-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-2);
}

.manager-action {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.tg-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2aabee, #229ed9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(42, 171, 238, 0.35);
  transition: transform 0.15s;
}
.manager-card:active .tg-btn {
  transform: scale(0.92);
}
.tg-btn svg {
  width: 22px;
  height: 22px;
}
.tg-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--tg);
}

/* ========== Trust ========== */
.trust {
  padding: 8px 0 32px;
}
.trust-list {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  box-shadow: var(--shadow);
}
.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
}
.trust-list li:last-child {
  border-bottom: none;
}
.trust-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ========== Final CTA ========== */
.final-cta {
  padding: 8px 0 32px;
}
.final-card {
  text-align: center;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  padding: 32px 20px;
  box-shadow: var(--shadow-md);
}
.final-card h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  color: var(--text);
}
.final-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.55;
}

/* ========== Footer ========== */
.footer {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 16px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.footer-logo {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text);
}
.footer-copy {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.footer-disc {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.5;
  opacity: 0.9;
}

/* ========== Animations ========== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero > *,
.feature-card,
.manager-card,
.plan-card,
.ref-card {
  animation: fadeUp 0.5s ease both;
}
.hero > *:nth-child(1) { animation-delay: 0.05s; }
.hero > *:nth-child(2) { animation-delay: 0.1s; }
.hero > *:nth-child(3) { animation-delay: 0.15s; }
.hero > *:nth-child(4) { animation-delay: 0.2s; }
.hero > *:nth-child(5) { animation-delay: 0.25s; }
.hero > *:nth-child(6) { animation-delay: 0.3s; }

.manager-card:nth-child(1) { animation-delay: 0.05s; }
.manager-card:nth-child(2) { animation-delay: 0.1s; }
.manager-card:nth-child(3) { animation-delay: 0.15s; }
.manager-card:nth-child(4) { animation-delay: 0.2s; }
.manager-card:nth-child(5) { animation-delay: 0.25s; }
.manager-card:nth-child(6) { animation-delay: 0.3s; }

/* ========== Tablet / Desktop ========== */
@media (min-width: 480px) {
  main, .header-inner, .footer {
    max-width: 440px;
  }
  .hero-title {
    font-size: 36px;
  }
  .plan-scroll {
    gap: 10px;
  }
  .manager-avatar {
    width: 64px;
    height: 64px;
  }
}

@media (min-width: 768px) {
  main {
    max-width: 720px;
    padding: 0 24px;
  }
  .header-inner {
    max-width: 720px;
    padding: 0 24px;
  }
  .footer {
    max-width: 720px;
  }
  .manager-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    padding: 40px 0 16px;
  }
  .hero-title {
    font-size: 42px;
  }
  .stats-row {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
  .cta-btn.primary {
    max-width: 320px;
  }
}

@media (min-width: 1024px) {
  .bg-glow-1 { width: 500px; height: 500px; }
  .bg-glow-2 { width: 400px; height: 400px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}


/* ========== Solo manager landing ========== */
.managers.solo {
  padding-top: 4px;
}
.solo-card {
  margin-bottom: 14px;
  border-color: rgba(42, 171, 238, 0.28);
  box-shadow: 0 8px 28px rgba(42, 171, 238, 0.12);
}
.manager-avatar.lg {
  width: 72px;
  height: 72px;
}
.solo-cta {
  display: flex;
  max-width: none;
  margin: 0 auto;
}
.managers.solo .cta-hint {
  text-align: center;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 10px 16px calc(10px + var(--safe-b));
  background: linear-gradient(to top, rgba(247,248,252,0.98) 55%, rgba(247,248,252,0));
  pointer-events: none;
}
.sticky-cta a {
  pointer-events: auto;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  height: 50px;
  font-size: 15px;
  border-radius: 12px;
}
.sticky-cta.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity .25s, transform .25s;
}

@media (min-width: 768px) {
  body {
    padding-bottom: calc(24px + var(--safe-b));
  }
  .sticky-cta {
    display: none;
  }
  .manager-avatar.lg {
    width: 80px;
    height: 80px;
  }
}
