/* =========================================================================
   점마 사이트 공통 (메인 · 강의/전자책 · 블로그) — style.css 위에 덧씀
   본문 폭 900px(--container), 자개 토큰(--pearl-*) 그대로
   ========================================================================= */

/* 어두운 첫 화면 (메인 · 강의/전자책 · 블로그 공통) */
.site-hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 84px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(60% 50% at 50% 100%, rgba(180, 170, 255, .26), rgba(150, 220, 255, .1) 45%, transparent 70%),
    linear-gradient(rgba(10, 9, 13, .8), rgba(10, 9, 13, .8)),
    url("../img/bg-dark.webp") center top / cover no-repeat,
    #000;
}
.site-hero.is-small { padding: 136px 0 64px; }
.site-title { font-size: 48px; font-weight: 800; line-height: 1.28; letter-spacing: -0.04em; }
.site-title em { color: transparent; background: var(--pearl-text-dark); -webkit-background-clip: text; background-clip: text; }
.site-sub { margin-top: 16px; font-size: 17px; line-height: 1.65; color: rgba(255, 255, 255, .72); }
/* AI에게 말 걸듯 묻는 검색창 (메인 첫 화면) — 예시 질문 타이핑 + 깜빡이는 커서는 main.js */
.ask { position: relative; max-width: 640px; margin: 30px auto 0; padding: 16px 16px 14px 22px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 24px; background: rgba(20, 18, 26, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); text-align: left; }
.ask:focus-within { border-color: rgba(214, 196, 255, .45); }
.ask-field { position: relative; display: block; margin-right: 56px; }
.ask-input { width: 100%; height: 40px; padding: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: #fff; caret-color: #d9c9ff; }
.ask-typing { position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden; font-size: 16px; color: rgba(255, 255, 255, .62); white-space: nowrap; pointer-events: none; }
.ask.is-filled .ask-typing, .ask:focus-within .ask-typing { opacity: 0; }
.ask-caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 2px; background: #d9c9ff; animation: ask-blink 1s steps(1) infinite; }
@keyframes ask-blink { 50% { opacity: 0; } }
.ask-go { position: absolute; top: 12px; right: 12px; display: grid; width: 48px; height: 48px; place-items: center; border: 0; border-radius: 50%; background: var(--pearl-fill); color: var(--ink); cursor: pointer; box-shadow: 0 6px 18px rgba(160, 130, 230, .35); transition: transform .15s ease; }
.ask-go:hover { transform: translateX(2px); }
.ask-go svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ask-chips { display: flex; gap: 8px; margin: 12px -16px 0 -4px; padding-right: 16px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.ask-chips::-webkit-scrollbar { display: none; }
.ask-chips a { flex: none; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 13.5px; color: rgba(255, 255, 255, .74); white-space: nowrap; transition: background-color .15s, color .15s; }
.ask-chips a:hover { background: rgba(255, 255, 255, .15); color: #fff; }
@media (prefers-reduced-motion: reduce) { .ask-caret { animation: none; } }

/* ---------- 메인: 네 갈래 입구 카드 ---------- */
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 330px;
  padding: 28px 28px 0;
  border: 1px solid var(--box-line);
  border-radius: var(--radius-l);
  background: var(--surface);
  transition: box-shadow .2s, border-color .2s;
}
.hub-card:hover { border-color: #d9d4e2; box-shadow: 0 16px 36px rgba(40, 32, 70, .12); }
.hub-card.is-dark { border-color: transparent; background: radial-gradient(80% 90% at 100% 0%, rgba(180, 170, 255, .22), transparent 60%), var(--dark); color: #fff; }
.hub-card small { font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: var(--accent); }
.hub-card.is-dark small { color: var(--accent-on-dark); }
.hub-card h3 { margin-top: 6px; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.hub-card p { margin-top: 8px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.hub-card.is-dark p { color: rgba(255, 255, 255, .7); }
.hub-go { position: absolute; top: 26px; right: 26px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--pearl-fill); color: var(--ink); font-size: 16px; font-weight: 800; }
.hub-visual { margin-top: auto; padding-top: 22px; }
/* 스토어: 표지 네 장 부채꼴 */
.hub-covers { display: flex; justify-content: center; height: 150px; }
.hub-covers img { width: 118px; height: 118px; margin: 0 -14px; border-radius: 10px; object-fit: cover; box-shadow: 0 10px 24px rgba(40, 32, 70, .22); }
.hub-covers img:nth-child(1) { rotate: -10deg; translate: 0 22px; }
.hub-covers img:nth-child(2) { rotate: -3deg; translate: 0 4px; z-index: 1; }
.hub-covers img:nth-child(3) { rotate: 4deg; translate: 0 6px; z-index: 2; }
.hub-covers img:nth-child(4) { rotate: 11deg; translate: 0 24px; }
/* 점마Pro: 노트북 화면 일부 */
.hub-screen { display: block; width: 100%; height: 150px; border-radius: 12px 12px 0 0; object-fit: cover; object-position: left top; box-shadow: 0 -6px 24px rgba(0, 0, 0, .35); }
/* 라이선스: 결과지 표지 두 장 */
.hub-sheets { display: flex; justify-content: center; gap: 12px; height: 150px; }
.hub-sheets span { display: grid; justify-items: center; align-content: start; gap: 6px; width: 104px; height: 150px; padding-top: 16px; border-radius: 6px 6px 0 0; background: #fff; box-shadow: 0 10px 24px rgba(40, 32, 70, .16); font-size: 10px; font-weight: 900; letter-spacing: .1em; color: var(--ink); }
.hub-sheets span:last-child { color: #6d5aa8; letter-spacing: -0.02em; font-size: 11px; }
.hub-sheets i { width: 34px; height: 34px; border-radius: 50%; background: #e9ecf2; }
.hub-sheets span:last-child i { border: 2px dashed #a99ccb; background: #f3eefe; }
.hub-sheets span:first-child { rotate: -4deg; }
.hub-sheets span:last-child { rotate: 4deg; }
/* 블로그: 글 목록 미리보기 */
.hub-posts { display: grid; gap: 8px; padding-bottom: 24px; }
.hub-posts li { padding: 12px 14px; border-radius: 10px; background: #fff; font-size: 14px; font-weight: 700; color: var(--ink); box-shadow: 0 1px 0 var(--box-line); }
.hub-posts li span { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--ink-3); }

/* 메인: 스토어 최근 상품 줄 */
.hub-popular { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* 스토어 상품 카드 (메인 '최근에 올라온 점마의 콘텐츠' 줄) — 스토어 화면 자체는 Next.js(src/app/store/store.module.css) */
.st-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--box-line); border-radius: var(--radius-l); background: #fff; transition: box-shadow .2s, border-color .2s; }
.st-card:hover { border-color: #d9d4e2; box-shadow: 0 14px 30px rgba(40, 32, 70, .12); }
.st-cover { position: relative; aspect-ratio: 1; background: var(--surface-2); }
.st-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.st-body { display: flex; flex: 1; flex-direction: column; padding: 12px 14px 14px; }
.st-cat { font-size: 11.5px; font-weight: 700; color: var(--accent); }
.st-title { display: -webkit-box; overflow: hidden; margin-top: 4px; font-size: 14.5px; font-weight: 800; line-height: 1.45; letter-spacing: -0.02em; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; }
.st-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; font-size: 12px; color: var(--ink-3); }
.st-foot b { font-weight: 800; color: var(--ink); }
.st-foot i { font-style: normal; font-weight: 700; color: var(--accent); white-space: nowrap; }
.st-off { font-style: normal; font-weight: 900; color: #e0523d; }

/* ---------- 블로그 ---------- */

/* 블로그 글 하나 */
.post { padding: 132px 0 40px; }
.post-crumb { font-size: 13px; color: var(--ink-3); }
.post-crumb a:hover { color: var(--ink); }
.post h1 { margin-top: 14px; font-size: 36px; font-weight: 800; line-height: 1.35; letter-spacing: -0.035em; word-break: keep-all; }
.post-meta { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }
.post-lead { margin-top: 22px; padding: 18px 20px; border-radius: var(--radius-m); background: var(--surface); font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.post-body { margin-top: 32px; font-size: 16.5px; line-height: 1.85; color: var(--ink); word-break: keep-all; }
.post-body h2 { margin: 44px 0 14px; font-size: 23px; font-weight: 800; line-height: 1.4; letter-spacing: -0.03em; }
.post-body h3 { margin: 30px 0 10px; font-size: 18px; font-weight: 800; }
.post-body p { margin: 14px 0; }
.post-body ul, .post-body ol { margin: 14px 0; padding-left: 22px; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin: 6px 0; }
.post-body .post-source { margin-top: 40px; font-size: 13px; line-height: 1.7; color: var(--ink-3); }
.post-body .post-source a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.post-body strong { font-weight: 800; }
.post-body figure { margin: 26px 0; }
.post-body figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-l); }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); }
.post-body table { width: 100%; margin: 20px 0; border-collapse: collapse; font-size: 15px; }
.post-body th, .post-body td { padding: 12px 10px; border-bottom: 1px solid var(--divider); text-align: left; vertical-align: top; }
.post-body th { font-weight: 700; background: var(--surface); }
.post-cta { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 48px; padding: 26px 28px; border-radius: var(--radius-l); background: var(--dark); color: #fff; }
.post-cta b { font-size: 18px; font-weight: 800; }
.post-cta p { margin-top: 4px; font-size: 14px; color: rgba(255, 255, 255, .7); }
.post-cta .btn { flex: none; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.post-nav a { padding: 16px 18px; border: 1px solid var(--box-line); border-radius: var(--radius-m); font-size: 14px; font-weight: 700; }
.post-nav a span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.post-nav a:last-child { text-align: right; }
.post-nav a:hover { border-color: #cfcbd8; }

/* ---------- 블랙프라이데이 페이지 (블프 섹션이 맨 위일 때 띠지 위치는 style.css에서 함께 정해요) ---------- */
.page-bf .bf-ended { padding-top: 180px; }


/* =========================================================
   모바일 (767px 이하) — 메인 · 강의/전자책 · 블로그 · 블랙프라이데이 페이지
   ========================================================= */
/* ---------- 블로그 목록: 어두운 첫 화면 + 큐레이션 · 탐색 탭 + 큰 카드 ---------- */
.bl-hero { padding-bottom: 0; }
.bl-brand { font-size: 64px; font-weight: 900; line-height: 1.1; letter-spacing: -0.045em; }
.bl-lead { margin-top: 22px; font-size: 21px; font-weight: 700; line-height: 1.55; color: rgba(255, 255, 255, .9); }
.bl-tabs { display: flex; justify-content: center; gap: 44px; margin-top: 64px; }
.bl-tabs button { position: relative; padding: 0 2px 18px; border: 0; background: none; font: inherit; font-size: 17px; font-weight: 800; color: rgba(255, 255, 255, .42); cursor: pointer; }
.bl-tabs button:hover { color: rgba(255, 255, 255, .75); }
.bl-tabs button[aria-selected="true"] { color: #fff; }
.bl-tabs button[aria-selected="true"]::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--pearl-fill); }
.bl-tabs button:focus-visible { outline: 2px solid #d9c9ff; outline-offset: 4px; border-radius: 4px; }
.bl-body { padding: 64px 0 96px; background: #f6f6f7; }
.bl-panel[hidden] { display: none; }
.bl-shelf-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 22px; }
.bl-shelf-head h2 { font-size: 30px; font-weight: 900; letter-spacing: -0.04em; }
.bl-shelf-head span { font-size: 17px; font-weight: 600; color: var(--ink-3); }
/* 가로 줄: 본문 왼쪽에서 시작해 화면 오른쪽 끝까지 이어져요 */
.bl-row-wrap { position: relative; margin-right: calc(50% - 50vw); }
.bl-row { display: flex; gap: 14px; padding-right: 64px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.bl-row::-webkit-scrollbar { display: none; }
.bl-row-btn { position: absolute; top: 50%; display: grid; width: 48px; height: 48px; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .14); cursor: pointer; translate: 0 -50%; }
.bl-row-btn[hidden] { display: none; }
.bl-row-btn.is-next { right: max(16px, calc(50vw - var(--container) / 2 - 64px)); }
.bl-row-btn.is-prev { left: -24px; }
.bl-row-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 카드 (큰 사진 카드처럼 — 사진 대신 자개빛 어두운 그라데이션, 머리말 cover가 있으면 그 그림) */
.bl-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 30px 30px 26px; border-radius: 6px; background: var(--bl-bg); color: #fff; isolation: isolate; }
.bl-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/bg-dark.webp") center / cover; opacity: .18; mix-blend-mode: screen; }
.bl-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .55)); }
.bl-card.is-row { flex: none; width: 440px; height: 330px; scroll-snap-align: start; }
.bl-card:hover .bl-title { text-decoration: underline; text-underline-offset: 4px; }
.bl-no { font-size: 38px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.bl-card-body { display: grid; gap: 8px; justify-items: start; }
.bl-cat { padding: 4px 11px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.bl-title { font-size: 21px; font-weight: 800; line-height: 1.4; letter-spacing: -0.03em; word-break: keep-all; }
.bl-desc { display: -webkit-box; overflow: hidden; font-size: 13.5px; line-height: 1.6; color: rgba(255, 255, 255, .72); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bl-tags { margin-top: 2px; font-size: 12px; letter-spacing: .08em; color: rgba(255, 255, 255, .55); }
/* 탐색: 주제 고르기 + 격자 */
.bl-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.bl-chip { height: 38px; padding: 0 16px; border: 1px solid #e2e0e6; border-radius: 999px; background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.bl-chip b { margin-left: 4px; font-weight: 600; color: var(--ink-3); }
.bl-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.bl-chip[aria-pressed="true"] b { color: rgba(255, 255, 255, .6); }
.bl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bl-card.is-grid { min-height: 300px; }
.bl-card[hidden] { display: none; }

@media (max-width: 767px) {
  .bl-brand { font-size: 38px; }
  .bl-lead { margin-top: 14px; font-size: 16px; }
  .bl-tabs { gap: 32px; margin-top: 40px; }
  .bl-tabs button { padding-bottom: 14px; font-size: 15.5px; }
  .bl-body { padding: 40px 0 64px; }
  .bl-shelf-head h2 { font-size: 23px; }
  .bl-row { gap: 10px; padding-right: 16px; }
  .bl-card { padding: 22px 20px 20px; }
  .bl-card.is-row { width: 78vw; height: 300px; }
  .bl-row-btn { display: none; }
  .bl-grid { grid-template-columns: 1fr; gap: 10px; }
  .bl-no { font-size: 30px; }
  .bl-title { font-size: 18px; }
  .site-hero { padding: 112px 0 56px; }
  .site-hero.is-small { padding: 104px 0 44px; }
  .site-title { font-size: 30px; }
  .site-sub { margin-top: 12px; font-size: 15px; }
  .ask { margin-top: 22px; padding: 12px 12px 12px 16px; border-radius: 20px; }
  .ask-field { margin-right: 48px; }
  .ask-input, .ask-typing { font-size: 15px; }
  .ask-go { top: 10px; right: 10px; width: 42px; height: 42px; }
  .ask-chips { margin-right: -12px; }
  .ask-chips a { padding: 8px 12px; font-size: 12.5px; }

  /* 메인: 입구 카드 한 줄씩 */
  .hub-grid { grid-template-columns: 1fr; gap: 12px; }
  .hub-card { min-height: 0; padding: 24px 20px 0; }
  .hub-card h3 { font-size: 21px; }
  .hub-card p { font-size: 14px; }
  .hub-go { top: 20px; right: 18px; width: 32px; height: 32px; }
  .hub-covers img { width: 100px; height: 100px; }
  .hub-popular { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* 스토어 상품 카드 */
  .st-body { padding: 10px 11px 12px; }
  .st-title { font-size: 13.5px; }

  /* 블로그 */
  .post { padding: 100px 0 32px; }
  .post h1 { font-size: 26px; }
  .post-lead { padding: 16px; font-size: 15px; }
  .post-body { font-size: 16px; }
  .post-body h2 { margin-top: 36px; font-size: 20px; }
  .post-body table { display: block; overflow-x: auto; font-size: 14px; }
  .post-cta { flex-direction: column; align-items: flex-start; padding: 22px 20px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a:last-child { text-align: left; }

  /* 블랙프라이데이 페이지 */
  .page-bf .bf-ended { padding-top: 120px; }
}
