/* ============================================================
   매매의정석 랜딩 페이지 — style.css
   🎨 라이트 배경 (#F8F9FC) + 블루/퍼플 포인트 (#4C51F7)
============================================================ */

/* ── 0. CSS VARIABLES ──────────────────────────────────────── */
:root {
  --c-bg:          #F8F9FC;
  --c-bg-2:        #EFF2F9;
  --c-bg-card:     #ffffff;

  --c-accent:      #4C51F7;
  --c-accent-lt:   #6B70FA;
  --c-accent-dk:   #3559F2;
  --c-accent-glow: rgba(76,81,247,0.18);

  /* 기존 --c-pink 호환 */
  --c-pink:        #4C51F7;
  --c-pink-lt:     #6B70FA;
  --c-pink-dk:     #3559F2;
  --c-pink-glow:   rgba(76,81,247,0.18);

  --c-text:        #1A2438;
  --c-text-muted:  #64748B;
  --c-text-dark:   #0F172A;

  --grad-bg:       linear-gradient(160deg, #F8F9FC 0%, #FFFFFF 50%, #F8F9FC 100%);
  --grad-accent:   linear-gradient(135deg, #3559F2 0%, #4C51F7 50%, #6B70FA 100%);
  --grad-badge:    linear-gradient(135deg, #3559F2 0%, #4C51F7 100%);
  --grad-pink:     linear-gradient(135deg, #3559F2 0%, #4C51F7 50%, #6B70FA 100%);

  --max-w:        600px;
  --r-card:       20px;
  --r-btn:        50px;
  --f-main:       'Pretendard', 'Inter', sans-serif;
}

/* ── 1. RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--f-main);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* ── 2. WRAPPER ─────────────────────────────────────────────── */
.kd-wrap {
  min-height: 100vh;
  background: var(--grad-bg);
}

/* ── 3. HERO SECTION ────────────────────────────────────────── */
.kd-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── 4. HEADLINE BLOCK ──────────────────────────────────────── */
.kd-headline-block {
  text-align: center;
  padding: 4px 0 0;
}

/* 알약 배지 */
.kd-pill-badge {
  display: block;
  text-align: center;
  margin: 0 auto 14px;
  width: fit-content;
  padding: 7px 20px;
  background: #ECEFFE;
  color: #4C51F7;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 50px;
  letter-spacing: 0.01em;
  border: 1.5px solid #D0D4FB;
}

.kd-sub-headline,
.kd-headline {
  font-size: 29px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 4px !important;
  display: block !important;
  text-align: center !important;
}

.kd-sub-headline {
  font-size: 29px !important;
  background: linear-gradient(90deg, #2B66F6 0%, #5352ED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.kd-headline {
  font-size: 29px !important;
  color: #1A2438;
  -webkit-text-fill-color: #1A2438;
  margin-bottom: 10px !important;
}

.kd-caution-text {
  font-size: 12.5px;
  color: var(--c-text-muted);
  opacity: 0.85;
  margin-top: 2px;
}

/* ── 5. PRODUCT CARD ────────────────────────────────────────── */
.kd-product-card {
  background: var(--c-bg-card);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(76,81,247,0.10), 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #E8EDFB;
}

.kd-product-badge {
  display: block;
  width: fit-content;
  margin: 16px auto 0;
  padding: 5px 14px;
  background: var(--grad-badge);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 20px;
}

/* ── 6. VIDEO WRAP ──────────────────────────────────────────── */
.kd-video-wrap {
  margin: 12px 0 0;
  position: relative;
}

.kd-video-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #0a0a1a;
  overflow: hidden;
}

/* Overlay */
.kd-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(10,10,26,0.72);
  cursor: pointer;
  transition: opacity 0.35s ease;
}
.kd-overlay.kd-hidden { opacity: 0; pointer-events: none; }

.kd-sound-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(76,81,247,0.25);
  border: 2px solid rgba(76,81,247,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  backdrop-filter: blur(4px);
  transition: transform 0.2s, background 0.2s;
}
.kd-overlay:hover .kd-sound-btn,
.kd-overlay:focus .kd-sound-btn {
  transform: scale(1.08);
  background: rgba(76,81,247,0.45);
}

.kd-overlay-text {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.kd-overlay-sub {
  font-size: 11.5px;
  color: rgba(255,255,255,0.72);
}

/* VIP badge */
.kd-vip-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 5;
  background: rgba(15,23,42,0.78);
  color: rgba(255,255,255,0.82);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

/* ── 7. PROGRESS BAR ────────────────────────────────────────── */
.kd-progress-bar {
  width: 100%;
  height: 5px;
  background: #E8EDFB;
  overflow: hidden;
}
.kd-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--grad-accent);
  transition: width 0.6s linear;
}

.kd-progress-label {
  text-align: center;
  font-size: 12px;
  color: var(--c-text-muted);
  padding: 8px 12px;
  background: #F3F4FE;
  letter-spacing: 0.01em;
  font-weight: 500;
}
.kd-progress-label.kd-done {
  color: var(--c-accent);
  font-weight: 700;
}

/* ── 8. PRODUCT INFO ────────────────────────────────────────── */
.kd-product-info {
  padding: 20px 20px 22px;
  text-align: center;
}
.kd-product-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  background: linear-gradient(90deg, #2B66F6 0%, #5352ED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  width: 100%;
}
.kd-product-divider {
  border: none;
  border-top: 1.5px solid #EFF2F9;
  margin: 12px auto;
}
.kd-product-desc {
  font-size: 14px;
  color: var(--c-text-muted);
  line-height: 1.65;
  text-align: center;
}

/* ── 9. CTA SECTION ─────────────────────────────────────────── */
.kd-cta-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 16px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: var(--c-bg);
  border-top: none;
  border-bottom: none;
}

/* 체크 아이콘 */
.kd-check-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--grad-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 16px var(--c-accent-glow);
}

/* CTA 텍스트 */
.kd-cta-text-block {
  text-align: center;
}
.kd-cta-sub {
  font-size: 13.5px;
  color: var(--c-text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}
.kd-cta-main {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-text-dark);
  letter-spacing: -0.01em;
}

/* 화살표 */
.kd-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--c-accent);
  opacity: 0.7;
}
.kd-arrows i {
  font-size: 14px;
  animation: arrowBounce 1.2s ease-in-out infinite;
}
.kd-arrows i:nth-child(2) { animation-delay: 0.15s; }
.kd-arrows i:nth-child(3) { animation-delay: 0.30s; }

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%       { transform: translateY(4px); opacity: 1; }
}

/* ── 10. CTA BUTTONS ────────────────────────────────────────── */

/* ─ 본문 버튼 */
.kd-btn-main {
  display: block;
  width: 100%;
  max-width: 440px;
  padding: 18px 24px;
  border-radius: var(--r-btn);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  transition: transform 0.18s, box-shadow 0.18s, background 0.25s;
  position: relative;
  overflow: hidden;
}

/* 잠금 상태 */
.kd-btn-main.kd-locked {
  background: #EFF2F9;
  color: #8892B8;
  border: 2.5px solid var(--c-accent);
  box-shadow: 0 0 0 4px var(--c-accent-glow);
  cursor: not-allowed;
}

/* 활성 상태 */
.kd-btn-main.kd-active {
  background: var(--grad-accent);
  color: #fff;
  border: none;
  box-shadow: 0 6px 28px var(--c-accent-glow), 0 2px 8px rgba(0,0,0,0.10);
  cursor: pointer;
  animation: btnPulse 2s ease-in-out infinite;
}
.kd-btn-main.kd-active:hover,
.kd-btn-main.kd-active:focus {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 36px var(--c-accent-glow);
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 6px 28px var(--c-accent-glow); }
  50%       { box-shadow: 0 8px 40px rgba(76,81,247,0.35); }
}

/* span 전환 */
.kd-btn-main .kd-off,
.kd-btn-main .kd-on {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.kd-btn-main.kd-locked .kd-off  { display: flex; }
.kd-btn-main.kd-locked .kd-on   { display: none; }
.kd-btn-main.kd-active .kd-off  { display: none; }
.kd-btn-main.kd-active .kd-on   { display: flex; }

/* 카운트다운 숫자 강조 */
.kd-btn-lock-status {
  font-size: 13px;
  font-weight: 600;
  color: #8892B8;
}
#kdBtnCountdown {
  font-size: 17px;
  font-weight: 800;
  color: var(--c-accent);
}

/* ── 11. WARNING BOX ────────────────────────────────────────── */
.kd-warning-box {
  width: 100%;
  max-width: 440px;
  background: #F3F4FE;
  border: 1px solid #DDE1F9;
  border-radius: 12px;
  padding: 14px 18px;
  text-align: center;
}
.kd-warning-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-accent-dk);
  margin-bottom: 6px;
}
.kd-warning-body {
  font-size: 12.5px;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ── 12. FOOTER ─────────────────────────────────────────────── */
.kd-footer {
  background: var(--c-bg);
  border-top: 1px solid #E0E5F5;
  padding: 28px 16px 100px;
}
.kd-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.kd-yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #E0E5F5;
  border-radius: 50px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.kd-yt-btn:hover {
  border-color: #FF0000;
  box-shadow: 0 2px 10px rgba(255,0,0,0.12);
}

.kd-footer-links {
  display: flex;
  gap: 10px;
  align-items: center;
}
.kd-footer-links a {
  font-size: 12px;
  color: var(--c-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.kd-footer-links a:hover { color: var(--c-accent); }
.kd-footer-links span { color: #CBD5E1; font-size: 12px; }

.kd-footer-disc {
  font-size: 11.5px;
  color: #94A3B8;
  line-height: 1.6;
  max-width: 400px;
}

.kd-privacy-box,
.kd-terms-box {
  background: #fff;
  border: 1px solid #E0E5F5;
  border-radius: 12px;
  padding: 18px;
  text-align: left;
  font-size: 12.5px;
  color: var(--c-text-muted);
  line-height: 1.7;
  width: 100%;
  max-width: 440px;
}
.kd-privacy-box h3,
.kd-terms-box h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 10px;
}
.kd-privacy-box p + p,
.kd-terms-box p + p { margin-top: 6px; }

/* ── 13. FLOATING BAR ───────────────────────────────────────── */
.kd-fbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 0 -2px 16px rgba(76,81,247,0.10);
  border-top: 1px solid #E0E5F5;
}

.kd-btn-fbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 16px 22px;
  border-radius: var(--r-btn);
  font-size: 15px;
  font-weight: 800;
  color: #8892B8;
  background: #EFF2F9;
  border: 2.5px solid var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-glow);
  cursor: not-allowed;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.kd-btn-fbar.kd-active,
.kd-btn-fbar:not(.kd-locked) {
  background: var(--grad-accent);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px var(--c-accent-glow);
  cursor: pointer;
  animation: btnPulse 2s ease-in-out infinite;
}

.kd-fbar-lock-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kd-fbar-lock-icon { font-size: 13px; }
.kd-fbar-arrow { font-size: 13px; }

.kd-fbar-off,
.kd-fbar-on {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.kd-btn-fbar.kd-locked .kd-fbar-off { display: flex; }
.kd-btn-fbar.kd-locked .kd-fbar-on  { display: none; }
.kd-btn-fbar.kd-active .kd-fbar-off { display: none; }
.kd-btn-fbar.kd-active .kd-fbar-on  { display: flex; }

.kd-fbar-lock-status {
  font-size: 13px;
  font-weight: 600;
  color: #8892B8;
}
#kdFbarCountdown {
  font-size: 15px;
  font-weight: 800;
  color: var(--c-accent);
}

/* ── 14. TOAST ──────────────────────────────────────────────── */
.kd-unlock-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  background: var(--grad-accent);
  color: #fff;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(76,81,247,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
  white-space: nowrap;
}
.kd-unlock-toast.kd-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── 15. SCROLL REVEAL ──────────────────────────────────────── */
.kd-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.kd-reveal.kd-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 16. RESPONSIVE ─────────────────────────────────────────── */
@media (min-width: 601px) {
  .kd-hero         { padding: 40px 24px 28px; }
  .kd-cta-section  { padding: 40px 24px 36px; }
  .kd-headline     { font-size: 46px; }
  .kd-btn-main     { font-size: 17px; padding: 20px 28px; }
  .kd-btn-fbar     { font-size: 16px; }
  .kd-product-info { padding: 24px 24px 26px; }
}

@media (max-width: 380px) {
  .kd-headline     { font-size: 28px; }
  .kd-btn-main     { font-size: 14.5px; padding: 16px 18px; }
  .kd-product-badge { font-size: 10px; padding: 4px 10px; }
}
