/* ==========================================================
   딱보 메인(소개) 화면 - 편집기와 같은 톤(어두운 남색 + 인디고)
   ========================================================== */
:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --line: #e3e7ee;
  --text: #182031;
  --muted: #5f6b80;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-weak: #eef0ff;
  --dark: #151a26;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.25; }
code { padding: 1px 6px; border-radius: 6px; background: var(--accent-weak); color: var(--accent); font-size: .9em; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.wrap.narrow { width: min(760px, 100% - 40px); }
.muted { color: var(--muted); }

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 17px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: #cbd2dd; background: #fff; color: var(--text); }
.btn-ghost:hover { border-color: #9aa6b8; }

/* 상단 내비 */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(21, 26, 38, .94); backdrop-filter: blur(8px); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-size: 19px; font-weight: 800; letter-spacing: -0.4px; text-decoration: none; }
.logo img { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: #b9c0cf; font-size: 14px; text-decoration: none; }
.nav-links a:hover { color: #fff; }

/* 첫 화면 */
.hero { padding: 72px 0 84px; background: var(--dark); color: #fff; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; margin-bottom: 18px; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; color: #c7cbff; font-size: 13px; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 800; }
.hero h1 em { font-style: normal; color: #8f88ff; }
.lead { max-width: 520px; margin: 20px 0 30px; color: #c3c9d6; font-size: 18px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.note { margin: 18px 0 0; color: #8e97aa; font-size: 14px; }

/* 첫 화면 그림: 악보가 칸에 들어간 종이 */
.hero-art { position: relative; display: flex; justify-content: center; padding: 10px 0 30px; }
.sheet {
  width: min(380px, 100%);
  aspect-ratio: 210 / 297;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 14px;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}
.sheet-title { margin-bottom: 12px; font-size: 15px; font-weight: 700; text-align: center; }
.sheet-grid { flex: 1; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr 1fr 1.25fr .9fr; gap: 8px; }
.slot { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 6px 10px; border-radius: 3px; background: #fbfbfd; }
.slot i { display: block; height: 1.5px; background: #2b3245; opacity: .75; }
.slot i:nth-child(odd) { margin-right: 18%; }
.slot b { position: absolute; top: 5px; left: 6px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #111827; color: #fff; font-size: 11px; }
.slot.drop { align-items: center; border: 2px dashed #9b96ff; background: var(--accent-weak); color: var(--accent); font-size: 12px; font-weight: 600; }
.sheet-foot { margin-top: 10px; color: #8a93a6; font-size: 10px; text-align: center; }
.floating-card {
  position: absolute;
  right: 4%;
  bottom: 6%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 150px;
  height: 64px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  transform: rotate(5deg);
  animation: float 3.2s ease-in-out infinite;
}
.floating-card i { display: block; height: 1.5px; background: #2b3245; opacity: .75; }
@keyframes float { 50% { transform: rotate(4deg) translateY(-8px); } }

/* 공통 섹션 */
section { padding: 72px 0; }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; }
.section-head p { margin: 10px 0 0; color: var(--muted); }

/* 사용법 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.steps li { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.step-no { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 800; }
.steps h3 { font-size: 19px; }
.steps p { margin: 8px 0 0; color: var(--muted); }

/* 기능 */
.features { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.f-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 12px; background: var(--accent-weak); color: var(--accent); }
.f-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 18px; }
.feature p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* 어디서든 이어서 */
.anywhere-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding: 36px; border-radius: 20px; background: var(--dark); color: #fff; }
.anywhere h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; }
.anywhere p { margin: 12px 0 0; color: #c3c9d6; }
.anywhere code { background: rgba(143, 136, 255, .18); color: #c7cbff; }
.file-chip { display: flex; align-items: center; gap: 14px; justify-self: center; padding: 16px 20px; border-radius: 14px; background: #fff; color: var(--text); box-shadow: var(--shadow-lg); transform: rotate(-3deg); }
.file-chip img { width: 44px; height: 44px; }
.file-chip strong { display: block; }
.file-chip span { color: var(--muted); font-size: 13px; }

/* 추천 상품 */
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.rec-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.rec-card:hover { border-color: #b9b5ff; transform: translateY(-2px); }
.rec-card img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: var(--bg); }
.rec-card strong { font-size: 15px; }
.rec-card span { color: var(--muted); font-size: 13px; }
.disclosure { margin: 16px 0 0; color: var(--muted); font-size: 13px; }

/* 광고 (띠배너) - 광고가 채워지지 않으면 자리째 숨김 */
.ad-slot { margin: 8px auto 24px; text-align: center; }
.ad-banner { display: block; width: 100%; height: 90px; } /* 메인 띠배너: 낮게 고정 */
.ad-in-faq { margin: 18px 0 0; }
.ad-label { display: block; margin-bottom: 4px; color: #98a2b3; font-size: 11px; letter-spacing: .5px; }
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
@media print { .ad-slot { display: none !important; } }

/* FAQ */
.faq details { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.faq summary { display: flex; align-items: center; padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-left: auto; color: var(--accent); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* 마지막 CTA, 푸터 */
.final-cta { text-align: center; }
.final-cta h2 { margin-bottom: 22px; font-size: clamp(26px, 3vw, 34px); font-weight: 800; }
.footer { padding: 28px 0; background: var(--dark); color: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 13px; }
.footer .muted { color: #8e97aa; }
.logo.small { font-size: 16px; }
.logo.small img { width: 24px; height: 24px; }
.logo small { color: #8e97aa; font-weight: 500; font-size: 12px; }

/* 개인정보처리방침 등 문서 페이지 */
.policy { padding: 56px 0 72px; }
.policy h1 { margin-bottom: 6px; font-size: 32px; font-weight: 800; }
.policy h2 { margin: 32px 0 10px; font-size: 19px; }
.policy p, .policy li { color: #3c475a; }
.policy ul { padding-left: 20px; }
.policy li { margin-bottom: 6px; }
.policy a { color: var(--accent); }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }

/* 반응형 */
@media (max-width: 900px) {
  .hero { padding-bottom: 56px; }
  .hero-inner, .anywhere-inner { grid-template-columns: 1fr; }
  .hero-art { margin-top: 10px; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-inner .btn { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .floating-card { animation: none; }
  html { scroll-behavior: auto; }
}
