/*
 * 주제별 소개 페이지(/todo, /routine …)의 꾸밈 — src/topics/render.ts 가 굽는 HTML 이 쓴다.
 *
 * 앱의 묶음(CSS)과 따로다. 이 페이지들은 스크립트 없이 뜨는 정적 HTML 이라 앱의
 * Tailwind·tokens.css 를 못 쓴다. 색과 글꼴은 첫 화면(src/landing/landing.css)과
 * 아이보리 옷(src/skin/ivory.css)의 값을 그대로 옮겨 적었다 — 한쪽을 바꾸면 여기도 본다.
 */
:root {
  --paper: #f4eee4;
  --card: #fffdf9;
  --gold: #a97b3f;
  --gold-2: #c9a26a;
  --gold-line: #e3cc9f;
  --gold-wash: #f3e7d6;
  --ink: #3a3027;
  --ink-2: #85745e;
  --ink-body: #5a4c3d;
  --hair: rgba(227, 204, 159, 0.55);
  --shadow: 0 1px 2px rgba(150, 112, 60, 0.06), 0 10px 28px rgba(150, 112, 60, 0.09);
  --serif: 'EB Garamond', 'Nanum Myeongjo', 'AppleMyungjo', Batang, serif;
  --sheen: linear-gradient(115deg, #9c6e2c 0%, #b8873e 30%, #d6ae66 46%, #e6c486 52%, #c99a4e 62%, #a07230 100%);
  --wrap: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo',
    'Noto Sans KR', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  word-break: keep-all;
  line-height: 1.6;
  background:
    radial-gradient(ellipse 70% 30% at 80% 0%, rgba(255, 255, 255, 0.75), transparent 70%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── 로고 — 금박 글씨의 모양에 금빛을 칠한다 (ivory.css 의 .iv-logo 와 같은 그림) ── */
.tp-logo {
  display: block;
  width: 100%;
  aspect-ratio: 1013 / 503;
  background: var(--sheen);
  -webkit-mask: url('/ivory-logo-bumyhub-v2.webp') no-repeat center / contain;
  mask: url('/ivory-logo-bumyhub-v2.webp') no-repeat center / contain;
}

/* ── 단추 ── */
.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 26px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition:
    filter 150ms,
    background-color 150ms;
}
.tp-btn-gold {
  background: var(--sheen);
  color: #fffaf0;
  text-shadow: 0 1px 1px rgba(110, 79, 34, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 222, 0.55),
    0 4px 14px rgba(169, 123, 63, 0.25);
}
.tp-btn-gold:hover {
  filter: brightness(1.06);
}
.tp-btn-line {
  border: 1px solid var(--gold-2);
  background: var(--card);
  color: var(--gold);
}
.tp-btn-line:hover {
  background: var(--gold-wash);
}
.tp-btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 13.5px;
}
.tp-btn-lg {
  height: 54px;
  padding: 0 44px;
  font-size: 16px;
}

/* ── 위 막대 ── */
.tp-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--hair);
  background: rgba(248, 245, 240, 0.86);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
}
.tp-nav-in {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(var(--wrap) + 64px);
  margin: 0 auto;
  padding: 12px 32px;
}
.tp-brand {
  width: 118px;
  flex-shrink: 0;
}
.tp-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* ── 첫 칸 ── */
.tp-hero {
  max-width: calc(var(--wrap) + 64px);
  margin: 0 auto;
  padding: 72px 32px 0;
}
.tp-hero-copy {
  max-width: 900px;
}
.tp-kicker {
  font-family: Cinzel, var(--serif);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--gold);
}
h1 {
  margin-top: 14px;
  font-family: 'Nanum Myeongjo', var(--serif);
  font-size: clamp(32px, 6vw, 54px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  /* 두 줄로 넘어갈 때 마지막 줄에 낱말 하나만 남지 않게 */
  text-wrap: balance;
}
.tp-lead {
  margin-top: 20px;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-body);
}
.tp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.tp-notes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-2);
}
.tp-notes i {
  font-style: normal;
  font-size: 9px;
  color: var(--gold-2);
}
.tp-shot {
  margin-top: 48px;
  padding: 10px;
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.tp-shot img {
  width: 100%;
  border-radius: 8px;
}

/* ── 본문 칸들 ── */
.tp-section {
  max-width: calc(var(--wrap) + 64px);
  margin: 0 auto;
  padding: 84px 32px 0;
}
h2 {
  position: relative;
  padding-left: 22px;
  font-family: 'Nanum Myeongjo', var(--serif);
  font-size: clamp(24px, 4.4vw, 32px);
  font-weight: 400;
  line-height: 1.35;
}
/* 제목 왼쪽의 금줄과 마름모 — 첫 화면 섹션 제목(.ld-head)과 같은 표시 */
h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(var(--gold-2), rgba(201, 162, 106, 0.2));
}
h2::after {
  content: '';
  position: absolute;
  left: -3px;
  top: 2px;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border: 1px solid var(--gold-2);
  background: var(--paper);
}
h3 {
  font-size: 16.5px;
  font-weight: 650;
  line-height: 1.45;
}

.tp-pains {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.tp-pains li {
  position: relative;
  padding: 18px 20px 18px 46px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.7);
  font-size: 15.5px;
  color: var(--ink-body);
}
.tp-pains li::before {
  content: '“';
  position: absolute;
  left: 18px;
  top: 10px;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  color: var(--gold-2);
}

.tp-features {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}
.tp-features article {
  padding: 24px 24px 26px;
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.tp-features p,
.tp-steps p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-body);
}

.tp-steps {
  margin-top: 28px;
  counter-reset: step;
  border-top: 1px solid var(--gold-line);
}
.tp-steps li {
  position: relative;
  padding: 22px 4px 22px 58px;
  border-bottom: 1px solid var(--gold-line);
  counter-increment: step;
}
.tp-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 4px;
  top: 20px;
  font-family: Cinzel, var(--serif);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--gold);
}

/* ── 가운데 띠 ── */
.tp-band {
  max-width: var(--wrap);
  margin: 84px auto 0;
  padding: 52px 28px;
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255, 255, 255, 0.9), transparent 70%),
    var(--gold-wash);
  text-align: center;
}
.tp-band h2 {
  padding-left: 0;
}
.tp-band h2::before,
.tp-band h2::after {
  content: none;
}
.tp-band p {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-2);
}
.tp-band .tp-btn {
  margin-top: 26px;
}

/* ── 자주 묻는 질문 ── */
.tp-faq {
  max-width: 820px;
  margin-top: 28px;
  border-top: 1px solid var(--gold-line);
}
.tp-faq details {
  border-bottom: 1px solid var(--gold-line);
}
.tp-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  cursor: pointer;
  list-style: none;
  font-size: 15.5px;
  font-weight: 600;
}
.tp-faq summary::-webkit-details-marker {
  display: none;
}
.tp-faq summary::after {
  content: '+';
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--gold);
}
.tp-faq details[open] summary::after {
  content: '−';
}
.tp-faq details p {
  padding: 0 4px 22px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-body);
}

/* ── 다른 정리 ── */
.tp-more ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.tp-more a {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--card);
  font-size: 14.5px;
  color: var(--ink);
}
.tp-more a:hover {
  border-color: var(--gold-2);
  color: var(--gold);
}

main {
  padding-bottom: 96px;
}

.tp-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 16px 34px;
  border-top: 1px solid var(--hair);
  font-family: Cinzel, var(--serif);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
}
.tp-foot a {
  width: 72px;
}

@media (min-width: 760px) {
  .tp-pains {
    grid-template-columns: repeat(3, 1fr);
  }
  .tp-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .tp-nav-in {
    padding: 10px 16px;
    gap: 12px;
  }
  .tp-brand {
    width: 92px;
  }
  .tp-hero {
    padding: 44px 18px 0;
  }
  .tp-section {
    padding: 60px 18px 0;
  }
  .tp-band {
    margin: 60px 18px 0;
    padding: 40px 20px;
  }
  .tp-lead {
    font-size: 16px;
  }
  .tp-cta .tp-btn {
    flex: 1 1 auto;
  }
  .tp-shot {
    margin-top: 34px;
    padding: 6px;
    border-radius: 10px;
  }
  .tp-steps li {
    padding-left: 48px;
  }
}
