/* ============================================
   보름달사주 - 기본 스타일시트
   ------------------------------------------------
   컨셉: 한밤의 보름달 아래 펼쳐보는 사주 한 장.
   컬러: 깊은 남색 밤하늘 + 고문서 인장을 연상시키는 앤틱 골드 포인트
   타이포: Gowun Batang(제목, 붓글씨풍 명조) + Gowun Dodum(본문, 정갈한 고딕)
   ============================================ */

:root {
  --bg: #0e0c22;
  --bg-alt: #14112c;
  --surface: #1a1638;
  --surface-2: #221d48;
  --line: rgba(232, 225, 255, 0.09);
  --gold: #c79a5c;
  --gold-soft: #e3c087;
  --gold-dim: rgba(199, 154, 92, 0.16);
  --text: #ede8f7;
  --text-dim: #9c92c0;
  --text-faint: #6c6394;
  --radius: 16px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* 하단 모바일 고정 CTA 바에 콘텐츠가 가려지지 않도록 여백 확보 */
  padding-bottom: 0;
}
body.has-sticky-cta { padding-bottom: 78px; }
@media (min-width: 801px) { body.has-sticky-cta { padding-bottom: 0; } }

h1, h2, h3, .brand-serif {
  font-family: "Gowun Batang", "Nanum Myeongjo", serif;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap.narrow { max-width: 560px; }

/* ---------- Moon mark (logo / decorative) ---------- */
.moon-mark { display: inline-block; line-height: 0; }
.moon-mark svg { display: block; }

/* ---------- Announcement bar ---------- */
.announce-bar {
  background: var(--gold-dim);
  color: var(--gold-soft);
  text-align: center;
  font-size: 12.5px;
  padding: 8px 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 12, 34, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "Gowun Batang", serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
  flex: none;
}
.logo span { color: var(--gold-soft); }
.nav {
  display: flex;
  gap: 26px;
  font-size: 14px;
  color: var(--text-dim);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; padding: 4px 0; flex: none; }
.nav a:hover { color: var(--gold-soft); }
@media (max-width: 560px) {
  .nav { gap: 18px; font-size: 13px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 108px 0 84px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 620px 360px at 50% -60px, rgba(90, 68, 160, 0.55), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}

/* 별빛 반짝임 - 개별 별마다 크기/위치/타이밍을 다르게 줘서 자연스럽게 반짝이도록 */
.starfield { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; }
.star {
  position: absolute;
  background: #d9d0f5;
  border-radius: 50%;
  animation: twinkle ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.7); }
}
@media (prefers-reduced-motion: reduce) {
  .star { animation: none; opacity: 0.55; }
}

.hero-moon { margin-bottom: 26px; opacity: 0.95; }
.hero h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.4;
  margin: 0 0 20px;
  font-weight: 700;
}
.hero-sub { color: var(--text-dim); font-size: 16px; margin-bottom: 34px; }
.hero-trust {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { flex: none; opacity: 0.8; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: "Gowun Dodum", sans-serif;
  cursor: pointer;
  text-align: center;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #221238;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(237, 232, 247, 0.22);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-text {
  display: inline-block;
  margin-top: 18px;
  color: var(--gold-soft);
  font-size: 14px;
}
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-block { display: block; width: 100%; margin-bottom: 10px; }
.btn:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 34px; }
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold-soft);
  margin-bottom: 10px;
}
.section-title { font-size: 26px; margin: 0 0 6px; font-weight: 700; }
.section-sub { color: var(--text-dim); margin: 0; font-size: 14px; }
.placeholder-note { color: var(--text-faint); font-style: normal; }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 52px;
  align-items: start;
}
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- Product grid/cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.product-grid-small { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .product-grid-small { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .product-grid, .product-grid-small { grid-template-columns: 1fr; }
}

.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.product-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.product-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.product-badge {
  display: inline-block;
  background: var(--gold-dim);
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.product-rank {
  font-family: "Gowun Batang", serif;
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 700;
}
.product-card h3 { font-size: 17px; margin: 2px 0 8px; font-weight: 700; }
.product-desc { color: var(--text-dim); font-size: 13px; margin: 0 0 18px; flex: 1; }
.product-price { display: flex; align-items: baseline; gap: 9px; margin-top: auto; }
.price-original { text-decoration: line-through; color: var(--text-faint); font-size: 12px; }
.price-now { color: var(--gold-soft); font-weight: 700; font-size: 19px; font-family: "Gowun Batang", serif; }
.product-price-lg .price-now { font-size: 28px; }

/* ---------- How it works ---------- */
.reco-list { list-style: none; padding: 0; margin: 0 0 26px; }
.reco-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 14.5px;
}
.reco-list li svg { flex: none; color: var(--gold-soft); }

.how-it-works {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.how-it-works h3 { margin-top: 0; font-size: 16px; }
.step-list { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: step; }
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 0 0 20px 38px;
  color: var(--text-dim);
  font-size: 14px;
}
.step-list li:last-child { padding-bottom: 0; }
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold-soft);
  font-family: "Gowun Batang", serif;
  font-weight: 700;
  font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
}
.step-list li::after {
  content: "";
  position: absolute;
  left: 11px; top: 24px; bottom: 2px;
  width: 1px;
  background: var(--line);
}
.step-list li:last-child::after { display: none; }

/* ---------- Reviews ---------- */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .review-grid { grid-template-columns: 1fr; } }
.review-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review-stars { color: var(--gold); letter-spacing: 2px; font-size: 13px; }
.review-card p { margin: 0; line-height: 1.65; }
.review-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-faint);
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.review-name { color: var(--text); font-weight: 600; }
.review-product {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold-dim);
  color: var(--gold-soft);
  font-size: 10.5px;
}
.review-date { margin-left: auto; }

/* ---------- CTA ---------- */
.cta-section { text-align: center; }
.cta-section h2 { margin-bottom: 26px; font-size: 24px; }

/* ---------- Product detail ---------- */
.product-detail .product-badge { margin-bottom: 14px; }
.product-detail h1 { font-size: 28px; margin: 0 0 14px; }
.product-long-desc { color: var(--text-dim); font-size: 14.5px; margin-bottom: 22px; }
.product-meta { list-style: none; padding: 0; color: var(--text-dim); font-size: 13.5px; }
.product-meta li { margin-bottom: 9px; display: flex; gap: 8px; align-items: center; }
.product-meta svg { flex: none; color: var(--gold-soft); }

.order-form-card, .order-summary-card, .mock-pg-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--line);
}
.order-form-card h2 { margin-top: 0; font-size: 18px; }

.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.field-group input[type="text"], .field-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(237, 232, 247, 0.14);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.field-group input:focus, .field-group select:focus {
  outline: none;
  border-color: var(--gold);
}
.radio-row { display: flex; gap: 18px; font-size: 14px; color: var(--text-dim); }
.date-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
.form-note { color: var(--text-faint); font-size: 12px; margin-top: 10px; text-align: center; }

.person-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.person-fieldset legend { padding: 0 8px; color: var(--gold-soft); font-size: 13px; font-weight: 700; }

/* ---------- Checkout ---------- */
.checkout-title { font-size: 22px; margin-bottom: 20px; }
.order-summary-card { margin-bottom: 18px; }
.order-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; color: var(--text-dim); }
.order-row-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 15px; font-size: 16px; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }

.mock-pg-badge {
  display: inline-block;
  background: var(--gold-dim);
  color: var(--gold-soft);
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.mock-pg-desc { color: var(--text-dim); font-size: 13px; margin-bottom: 18px; }

/* ---------- Processing / result ---------- */
.processing-wrap, .result-wrap { text-align: center; padding-top: 20px; }
.spinner {
  width: 44px; height: 44px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.processing-status { font-size: 12px; color: var(--text-faint); }
.result-icon { margin-bottom: 14px; display: flex; justify-content: center; }
.result-sub { color: var(--text-dim); margin-bottom: 26px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; margin-top: 40px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: "Gowun Batang", serif; font-weight: 700; margin-bottom: 12px; }
.footer-desc, .footer-biz, .footer-copy { color: var(--text-faint); font-size: 11.5px; margin: 7px 0; line-height: 1.8; }

/* ---------- Trust mini row (가격 옆 안심 문구) ---------- */
.trust-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--text-faint);
}
.trust-mini li { display: flex; align-items: center; gap: 6px; }
.trust-mini svg { flex: none; color: var(--gold-soft); }

/* ---------- FAQ (details/summary 아코디언, JS 불필요) ---------- */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 26px 16px 0;
  font-weight: 700;
  font-size: 14.5px;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  color: var(--gold-soft);
  font-size: 20px;
  font-family: "Gowun Batang", serif;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 16px; color: var(--text-dim); font-size: 13.5px; }

/* ---------- 모바일 하단 고정 CTA 바 ---------- */
.sticky-cta {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: rgba(14, 12, 34, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.sticky-cta .sticky-price { font-family: "Gowun Batang", serif; color: var(--gold-soft); font-weight: 700; font-size: 17px; white-space: nowrap; }
.sticky-cta .btn { flex: 1; max-width: 220px; }
@media (max-width: 800px) {
  .sticky-cta { display: flex; }
}

/* ---------- 세부 반응형 보정 ---------- */
@media (max-width: 560px) {
  .hero { padding: 76px 0 56px; }
  .section { padding: 52px 0; }
  .date-row { gap: 6px; }
  .date-row select { padding: 10px 6px; font-size: 13px; }
  .faq-item summary { font-size: 13.5px; padding: 14px 24px 14px 0; }
}
