/* VocaReels — 릴스(VocaSnsAuto/remotion VocaWordCard)와 같은 지면: 아이보리 종이, 따뜻한 먹색, 붉은 벽돌빛 강조.
   영문은 세리프, 한글은 릴스에 쓰는 Paperlogy(OFL, KS X 1001 서브셋). 장식은 걷어내고 여백과 글자 대비로 무게를 준다. */

@font-face {
  font-family: "Paperlogy";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/paperlogy-400.woff2") format("woff2");
}

:root {
  --paper: #eee4cf;      /* 릴스 PAPER_BLEED */
  --paper-deep: #e4dac6; /* 칩 */
  --paper-hi: #f7f0e2;
  --ink: #23201c;        /* 순검정이 아닌 먹색 */
  --soft: #6b6357;       /* 글자용 보조색(본문 대비 확보) */
  --faint: #8a8175;      /* 릴스 INK_SOFT — 큰 글자·장식만 */
  --rule: #d5c9b0;
  --accent: #c0553a;     /* 낭독 강조 */
  --header: 64px;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: "Paperlogy", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  /* 종이 결: 아주 옅은 잡티 */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .16 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
body::after { content: ""; position: fixed; inset: 0; z-index: 3; pointer-events: none; background: var(--grain); }
::selection { background: var(--accent); color: var(--paper-hi); }

h1, h2, h3, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/* ── 머리글 ── */
.top {
  position: fixed; inset: 0 0 auto; z-index: 2;
  height: var(--header);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 44px);
  background: linear-gradient(var(--paper) 60%, transparent);
}
.logo { font-family: var(--serif); font-size: 24px; line-height: 1; letter-spacing: -0.015em; }
.top nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.top nav a { font-size: 14px; color: var(--soft); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .15s ease, border-color .15s ease; }
.top nav a:hover, .top nav a:focus-visible { color: var(--ink); border-color: var(--ink); }
@media (max-width: 520px) { .top nav .opt { display: none; } .logo { font-size: 22px; } }

/* 영문 작은 머리말 */
.over { font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.2; color: var(--accent); margin-bottom: 18px; }
.hl { background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 94% / 100% 2px; padding-bottom: 2px; color: var(--accent); }

/* ── 첫 화면 ── */
.hero {
  max-width: 1180px; margin: 0 auto;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header) + 12px) clamp(18px, 4vw, 44px) 48px;
  display: grid; align-content: center; align-items: center;
  gap: 40px clamp(24px, 6vw, 88px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }

.hero h1 { font-weight: 400; font-size: clamp(52px, 8vw, 104px); line-height: 1.06; letter-spacing: -0.03em; }
.lede { margin-top: 26px; max-width: 28em; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.85; color: var(--soft); text-wrap: pretty; }
.cta-row { margin-top: clamp(26px, 3.4vw, 38px); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

.cta {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 26px 15px 28px; border-radius: 999px;
  background: var(--ink); color: var(--paper-hi);
  font-size: 16px; line-height: 1.2;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.cta .ar { font-family: var(--serif); font-size: 18px; transition: transform .2s ease; }
.cta:hover { transform: translateY(-2px); background: var(--accent); }
.cta:hover .ar { transform: translate(2px, -2px); }
.cta.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.cta.ghost:hover { background: var(--ink); color: var(--paper-hi); }
.cta:active { transform: translateY(1px) scale(.98); }
.more { font-size: 15px; color: var(--soft); padding: 4px 0; border-bottom: 1px solid var(--faint); transition: color .15s ease, border-color .15s ease; }
.more:hover, .more:focus-visible { color: var(--ink); border-color: var(--ink); }

/* ── 릴스 카드 ──
   그림(2:3) 위에 글자를 얹는다. 글자 크기는 카드 폭 기준(cqw)이라 어디서든 같은 비율이다.
   위쪽 46%는 글자 자리, 그림은 아래쪽에 앉는다(VocaSnsAuto 그림체 지시문의 배치). */
/* reel:start — scripts/ebook.py 가 이 블록을 PDF 에 그대로 가져다 쓴다 */
.reel {
  position: relative; margin: 0;
  container-type: inline-size;
  aspect-ratio: 2 / 3;
  overflow: hidden; border-radius: 4px; background: var(--paper);
  box-shadow: 0 0 0 1px rgb(35 32 28 / .07), 0 24px 44px -24px rgb(35 32 28 / .4);
  transition: opacity .34s ease, transform .34s ease;
}
.reel img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.reel figcaption { position: relative; padding: 11cqw 8cqw 0; text-align: center; color: var(--ink); }
.hw { font-family: var(--serif); font-size: 13cqw; line-height: 1.02; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.hw-ko { margin-top: 2.4cqw; font-size: 4.2cqw; line-height: 1.4; color: var(--soft); }
.sent { margin-top: 6cqw; font-family: var(--serif); font-size: 6cqw; line-height: 1.28; text-wrap: balance; }
.sent .w { transition: color .25s ease; }
.sent .hit, .sent .read { color: var(--accent); }
.sent-ko { margin-top: 2.6cqw; font-size: 3.8cqw; line-height: 1.5; color: var(--soft); text-wrap: balance; }
.chips { margin: 4cqw 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6cqw; }
.chips li { padding: .8cqw 3cqw 1cqw; border-radius: 999px; background: rgb(35 32 28 / .06); font-size: 3.3cqw; line-height: 1.5; color: var(--soft); }
.chips span { font-family: var(--serif); font-size: 3.7cqw; color: var(--ink); }
.src { margin-top: 3cqw; font-family: var(--serif); font-style: italic; font-size: 3.3cqw; line-height: 1.3; color: var(--soft); }
.reel.leave { opacity: 0; transform: translateY(-6px); }
.reel.enter { opacity: 0; transform: translateY(8px); }
/* reel:end */

/* ── 데모 ── */
.demo { display: grid; justify-items: center; gap: 18px; }
.demo .reel { width: min(100%, 360px, calc((100svh - 170px) / 1.5)); min-width: 220px; }
.dots { display: flex; gap: 2px; }
.dots button { position: relative; width: 26px; height: 26px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
.dots button::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 1.5px solid currentColor; transition: background .2s ease; }
.dots button[aria-current="true"]::after { background: currentColor; }

/* ── 구역 공통 ── */
.band { padding-top: clamp(72px, 10vw, 140px); }
.in { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 44px); }
.h2 { font-weight: 400; font-size: clamp(34px, 5vw, 58px); line-height: 1.14; letter-spacing: -0.025em; text-wrap: balance; }
.sub { margin-top: 18px; max-width: 32em; font-size: 16px; line-height: 1.8; color: var(--soft); text-wrap: pretty; }

/* ── 카드 한 장 ── */
.anat { margin-top: clamp(32px, 5vw, 56px); display: grid; border-top: 1px solid var(--ink); }
.anat li { padding: 26px 0 30px; border-bottom: 1px solid var(--rule); }
@media (min-width: 860px) {
  .anat { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .anat li { padding: 28px 28px 8px 0; border-bottom: 0; }
  .anat li + li { padding-left: 28px; border-left: 1px solid var(--rule); }
}
.anat .no { display: block; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--accent); }
.anat h3 { margin-top: 10px; font-weight: 400; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.anat p { margin-top: 10px; font-size: 15px; line-height: 1.8; color: var(--soft); text-wrap: pretty; }

/* ── 카드 모음 ── */
.strip-wrap {
  margin-top: clamp(20px, 3vw, 36px);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  padding: 12px clamp(18px, 4vw, 44px) 40px;
  scrollbar-width: thin; scrollbar-color: var(--faint) transparent;
}
.strip { display: flex; align-items: flex-start; gap: clamp(16px, 2.4vw, 28px); }
.slot { flex: none; width: clamp(224px, 24vw, 280px); scroll-snap-align: start; }
.slot .reel { transition: transform .25s ease, box-shadow .25s ease; }
.slot:hover .reel { transform: translateY(-4px); }
.cat { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.4; color: var(--soft); }

/* ── 전자책 받기 ── */
.get { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; justify-items: center; }
@media (min-width: 760px) { .get { grid-template-columns: auto minmax(0, 1fr); justify-items: start; } }
.book { width: clamp(190px, 26vw, 250px); }
.book img { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 0 0 1px rgb(35 32 28 / .07), 0 24px 44px -24px rgb(35 32 28 / .4); }
.get-copy .cta-row { margin-top: clamp(22px, 3vw, 30px); }
.get-note { margin-top: 18px; max-width: 32em; font-size: 14px; line-height: 1.75; color: var(--soft); text-wrap: pretty; }
.get-how { margin-top: 14px; max-width: 34em; }
.get-how summary { display: inline-block; cursor: pointer; font-size: 15px; line-height: 1.4; color: var(--soft); border-bottom: 1px solid var(--faint); }
.get-how summary:hover { color: var(--ink); border-color: var(--ink); }
.get-how ul { margin-top: 12px; display: grid; gap: 8px; }
.get-how li { font-size: 14.5px; line-height: 1.75; color: var(--soft); text-wrap: pretty; }
.get-how b { margin-right: 6px; color: var(--ink); font-weight: 400; border-bottom: 1px solid var(--rule); }

/* ── 마무리 ── */
.closing { text-align: center; padding: clamp(88px, 12vw, 160px) clamp(18px, 4vw, 44px) clamp(76px, 10vw, 124px); }
.closing .big { margin: 0 auto; max-width: 12em; font-size: clamp(36px, 5.6vw, 66px); line-height: 1.16; letter-spacing: -0.03em; text-wrap: balance; }
.closing .cta { margin-top: 34px; }

/* ── 바닥글 ── */
.foot {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px;
  padding: 28px clamp(18px, 4vw, 44px) 36px;
  border-top: 1px solid var(--rule);
}
.foot .logo { font-size: 22px; }
.foot p { font-size: 13px; color: var(--soft); }
.foot p a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* 404 */
.notfound { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 20px; padding: 0 18px; text-align: center; }
.notfound h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(96px, 20vw, 190px); line-height: 1; letter-spacing: -0.04em; }
.notfound p { font-size: 16px; color: var(--soft); }
