@import url("https://fonts.googleapis.com/css2?family=Song+Myung&family=Nanum+Myeongjo:wght@400;700;800&family=Noto+Sans+KR:wght@400;500;700&display=swap");

/* 채널 배너·쇼츠와 같은 결: 안개 낀 회청색 산 + 승복 회색 + 가사 밤색 */
:root {
  --mist: #e8ebee;
  --mist-2: #d5dbe1;
  --mist-3: #b9c3cc;
  --ink: #1f2a33;
  --ink-soft: #55636f;
  --line: rgba(31,42,51,.14);
  --robe: #5c2f26;          /* 가사 밤색 */
  --robe-ink: #fbf7f2;
  --night: #1c252d;
  --gold: #f2d27a;          /* 쇼츠 자막 노랑 */
  --title: "Song Myung", "Nanum Myeongjo", serif;
  --serif: "Nanum Myeongjo", serif;
  --sans: "Noto Sans KR", system-ui, sans-serif;
  --wrap: 1040px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--mist); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.85; word-break: keep-all; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* 머리: 첫 화면 위에 투명하게 떠 있다가 내리면 안개색 */
.top { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .5s, box-shadow .5s; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.top.solid { background: rgba(232,235,238,.9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.logo { font-family: var(--title); font-size: 26px; text-decoration: none; letter-spacing: .02em; }
.nav { display: flex; gap: 24px; font-size: 16px; }
.nav a { text-decoration: none; opacity: .8; } .nav a:hover { opacity: 1; }
body.has-hero .top:not(.solid) { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
body:not(.has-hero) { padding-top: 68px; }
body:not(.has-hero) .top { background: rgba(232,235,238,.92); box-shadow: 0 1px 0 var(--line); }
.seal { display: none; }

/* 첫 화면 = 채널 배너 */
.hero { position: relative; height: 100vh; min-height: 560px; max-height: 960px; overflow: hidden; color: #fff; background: #9aa6b1; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 75%; animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.03); } to { transform: scale(1.13) translateY(-1.5%); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,52,62,.25) 0%, rgba(40,52,62,.05) 40%, rgba(232,235,238,.0) 70%, var(--mist) 100%); }
.mist { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 70% 22% at 25% 72%, rgba(255,255,255,.55), transparent 70%), radial-gradient(ellipse 55% 18% at 78% 64%, rgba(255,255,255,.45), transparent 70%);
  animation: mist 28s linear infinite alternate; }
@keyframes mist { from { transform: translateX(-7%); } to { transform: translateX(7%); } }
.hero .copy { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 20px 8vh; }
.hero h1 { font-family: var(--title); font-weight: 400; font-size: clamp(56px, 11vw, 120px); line-height: 1.1; margin: 0 0 14px; letter-spacing: .04em;
  text-shadow: 0 2px 0 rgba(0,0,0,.08), 0 6px 30px rgba(30,40,50,.35); }
.hero p { font-family: var(--serif); font-size: clamp(18px, 2.4vw, 24px); margin: 0 0 34px; text-shadow: 0 2px 14px rgba(30,40,50,.45); }
.hero h1, .hero p, .hero .cta { opacity: 0; animation: rise 1.8s ease forwards; }
.hero p { animation-delay: .7s; } .hero .cta { animation-delay: 1.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; z-index: 2; width: 1px; height: 52px; background: linear-gradient(var(--ink-soft), transparent); animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0%,100% { opacity: .2; transform: translateY(0); } 50% { opacity: .8; transform: translateY(8px); } }

.btn { display: inline-block; padding: 15px 30px; border-radius: 999px; background: var(--robe); color: var(--robe-ink); text-decoration: none; font-weight: 700; font-size: 17px; border: 0; cursor: pointer; transition: transform .3s, box-shadow .3s; box-shadow: 0 8px 24px rgba(92,47,38,.25); }
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.7); box-shadow: none; backdrop-filter: blur(4px); }
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* 구역 */
section { padding: 96px 0; position: relative; }
.eyebrow { font-size: 14px; letter-spacing: .25em; color: var(--ink-soft); margin: 0 0 10px; }
h2 { font-family: var(--title); font-weight: 400; font-size: clamp(32px, 4.6vw, 46px); line-height: 1.35; margin: 0 0 22px; }
h3 { font-family: var(--serif); font-weight: 800; font-size: 22px; margin: 0 0 8px; }
.lead { font-size: 20px; color: var(--ink-soft); }
.center { text-align: center; }

/* 스님 말씀 (쇼츠 장면) */
.scene { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.frame { position: relative; aspect-ratio: 9/14; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px rgba(31,42,51,.22); background: #7d8890; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.frame .sub { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; font-family: var(--sans); font-weight: 700; font-size: clamp(20px, 2.6vw, 28px); color: #fff;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 2px 6px rgba(0,0,0,.6); transition: opacity .6s; padding: 0 10px; }
.frame .sub.gold { color: var(--gold); }
.frame .cap { position: absolute; top: 7%; left: 50%; transform: translateX(-50%); background: rgba(20,24,28,.7); color: #fff; font-size: 15px; font-weight: 700; padding: 6px 14px; border-radius: 6px; white-space: nowrap; }
.scene blockquote { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.8vw, 28px); line-height: 1.85; }
.scene cite { display: block; margin-top: 16px; font-style: normal; font-size: 15px; color: var(--ink-soft); }

/* 상품 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 24px; }
.card { background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); backdrop-filter: blur(8px); border-radius: 18px; padding: 30px; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(31,42,51,.06); transition: transform .4s, box-shadow .4s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(31,42,51,.1); }
.card .price { font-family: var(--serif); font-size: 26px; font-weight: 800; margin: 6px 0 14px; }
.card .soon { font-size: 15px; font-weight: 400; color: var(--ink-soft); }
.card p { margin: 0 0 20px; color: var(--ink-soft); flex: 1; }
.badge { display: inline-block; font-size: 13px; padding: 2px 12px; border-radius: 20px; margin-bottom: 12px; align-self: flex-start; background: var(--ink); color: #fff; }
.card .badge.wait { background: transparent; color: var(--ink-soft); border: 1px solid var(--mist-3); }
.bg-mist { background: linear-gradient(180deg, var(--mist) 0%, var(--mist-2) 100%); }

/* 오늘의 한 줄 (밤 산) */
.today { color: #e9edf0; text-align: center; padding: 120px 0; overflow: hidden;
  background: linear-gradient(180deg, rgba(28,37,45,.86), rgba(28,37,45,.94)), url("/img/hero.jpg") center 70%/cover; }
.today .eyebrow { color: var(--gold); }
.today blockquote { font-family: var(--title); font-size: clamp(28px, 4.4vw, 44px); line-height: 1.6; margin: 0 auto; max-width: 820px; }
.today cite { display: block; margin-top: 20px; font-style: normal; font-size: 15px; color: #a9b4bd; }
.today .enso { display: none; }

/* 무료 */
.free { text-align: center; }

/* 소개 */
.about { display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: center; }
.about img { border-radius: 200px 200px 18px 18px; aspect-ratio: 2/3; object-fit: cover; box-shadow: 0 30px 60px rgba(31,42,51,.2); }

/* 묻고 답하기 */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; }
summary::after { content: "+"; font-family: var(--serif); font-size: 24px; line-height: 1; color: var(--ink-soft); transition: transform .3s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; color: var(--ink-soft); }

/* 책 상세 */
.cover { position: relative; overflow: hidden; aspect-ratio: 3/4; border-radius: 6px; padding: 30px 26px; display: flex; flex-direction: column; justify-content: space-between; color: #fff;
  background: linear-gradient(180deg, rgba(40,52,62,.1), rgba(40,52,62,.55)), url("/img/hero.jpg") 30% 80%/cover; box-shadow: 0 30px 60px rgba(31,42,51,.25), 8px 0 0 -2px #cfd6dc inset; }
.cover .t { font-family: var(--title); font-size: 34px; line-height: 1.35; text-shadow: 0 2px 16px rgba(0,0,0,.35); }
.cover .a { font-family: var(--serif); font-size: 16px; text-align: right; opacity: .95; }
.cover svg.enso, .cover .mark, .cover .seal { display: none; }
.book { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 56px; align-items: start; padding-top: 20px; }
.book ul { padding-left: 1.1em; margin: 0 0 22px; }
.buy { margin-top: 26px; padding: 26px; background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.85); border-radius: 18px; box-shadow: 0 10px 30px rgba(31,42,51,.06); }
.buy .price { font-family: var(--serif); font-size: 30px; font-weight: 800; }
.buy small { display: block; color: var(--ink-soft); font-size: 15px; line-height: 1.7; margin-top: 14px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; margin: 12px 0; }
.agree input { width: 20px; height: 20px; margin-top: 5px; flex-shrink: 0; accent-color: var(--robe); }
.toc { columns: 2; column-gap: 40px; font-size: 16px; color: var(--ink-soft); padding-left: 1.4em; }
.toc li { break-inside: avoid; margin-bottom: 6px; }
.meter { height: 10px; background: var(--mist-2); border-radius: 10px; overflow: hidden; margin: 14px 0 6px; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--robe), #8a4a3c); transition: width 1.2s ease; }
.meter-t { margin: 0 0 14px; font-size: 16px; color: var(--ink-soft); }
#sf input[type=email] { width: 100%; font-size: 18px; padding: 15px 18px; border: 1px solid var(--mist-3); border-radius: 12px; background: #fff; font-family: inherit; }
#sf .btn { width: 100%; margin-top: 6px; }
#sf .btn:disabled { opacity: .6; }
.hp { position: absolute; left: -9999px; }
.msg { min-height: 1.6em; margin: 10px 0 0; font-weight: 700; color: var(--robe); }

/* 글 페이지 */
.doc { padding: 56px 0 90px; }
.doc h1 { font-family: var(--title); font-weight: 400; font-size: 38px; margin: 0 0 8px; }
.doc h2 { font-family: var(--serif); font-weight: 800; font-size: 21px; margin: 34px 0 10px; }
.doc p, .doc li { color: var(--ink-soft); font-size: 17px; }
.todo { background: #fff3c4; padding: 0 4px; border-radius: 2px; color: #6b5200; }

/* 바닥 */
.foot { background: var(--night); color: #9aa6b0; padding: 48px 0 64px; font-size: 14px; line-height: 1.9; }
.foot .links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; font-size: 15px; }
.foot .links a { text-decoration: none; color: #d9dfe4; }
.foot .links a.strong { font-weight: 700; color: #fff; }
.foot a { color: #d9dfe4; }

/* 나타나기 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 1.2s ease, transform 1.2s ease; }
.reveal.on { opacity: 1; transform: none; }
.brush { display: none; }

/* 음악 */
.music { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 10px; background: rgba(28,37,45,.88); backdrop-filter: blur(8px); color: #e9edf0; border-radius: 40px; padding: 7px 16px 7px 7px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.music button { all: unset; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; background: var(--robe); display: grid; place-items: center; font-size: 13px; }
.music .bars { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.music .bars i { width: 3px; height: 4px; background: #e9edf0; border-radius: 1px; }
.music.playing .bars i { animation: eq 1.2s ease-in-out infinite; }
.music.playing .bars i:nth-child(2) { animation-delay: .2s; } .music.playing .bars i:nth-child(3) { animation-delay: .45s; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 14px; } }

@media (prefers-reduced-motion: reduce) { .hero > img, .mist, .scroll-cue { animation: none; } .reveal { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  body { font-size: 17px; }
  .nav { gap: 14px; font-size: 15px; } .nav .hide-sm { display: none; }
  section { padding: 68px 0; }
  .scene, .about, .book { grid-template-columns: 1fr; gap: 36px; }
  .frame { max-width: 340px; margin: 0 auto; }
  .about img { max-width: 260px; margin: 0 auto; }
  .book .cover { max-width: 280px; margin: 0 auto; }
  .toc { columns: 1; }
  .today { padding: 84px 0; }
}
