/* markpin.dev — 확장과 같은 토큰: 종이 표면, 잉크 텍스트, 앰버는 CTA 한 곳. */
:root {
  --paper: #FAFAF9;
  --ink: #171717;
  --muted: #6F6B66;
  --line: #E4E2DE;
  --code: #F1F0EC;
  --amber: hsl(34 100% 55%);
  --amber-ink: #FFFFFF;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #141414; --ink: #F2F1EE; --muted: #9B9891; --line: #2A2A28; --code: #1C1C1B; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  padding-inline: 20px;
  padding-block: 0 48px;
  word-break: keep-all;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
code, pre { font-family: var(--mono); }
.muted { color: var(--muted); }

.top {
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; font-size: 17px; letter-spacing: -0.02em; }
.brand img { border-radius: 4.5px; }
.top nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.top nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.top nav a:not(.btn):hover { color: var(--ink); }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600; white-space: nowrap;
  background: var(--amber); color: var(--amber-ink);
  padding: 7px 14px; border-radius: 8px; font-size: 14px; line-height: 1.3;
}
.btn.big { padding: 12px 20px; font-size: 16px; border-radius: 10px; }
.btn:hover { filter: brightness(1.04); }

main { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 72px; padding-block: 56px 0; }

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5.2vw, 44px); font-weight: 700; line-height: 1.2; letter-spacing: -0.025em; max-width: 18ch; }
.hero .tagline { margin-top: 18px; font-size: 19px; color: var(--muted); }
.hero .cta { margin-top: 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero .note { font-size: 13px; color: var(--muted); }

.features ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.features li { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.features .num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.features h3 { font-size: 17px; font-weight: 700; }
.features p { font-size: 15px; color: var(--muted); }

.flow h2, .mcp h2, .doc h2 { font-size: 20px; font-weight: 700; }
.flow ol { margin: 16px 0 0; padding-left: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.flow li { position: relative; padding-left: 34px; counter-increment: step; }
.flow li::before {
  content: counter(step); position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line);
  font-family: var(--mono); font-size: 12px; display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.flow .muted { margin-top: 16px; font-size: 14px; }

.mcp p { margin-top: 10px; max-width: 62ch; }
.mcp pre { margin: 14px 0 0; background: var(--code); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; font-size: 13.5px; }
.mcp p + p { font-size: 14px; }

footer { max-width: 760px; margin: 96px auto 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
footer a { color: inherit; }
.langs { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.langs .label { margin-right: 4px; }
.langs [aria-current] { color: var(--ink); font-weight: 600; }

/* 방침 문서 */
.doc { gap: 0; max-width: 680px; padding-top: 40px; }
.doc h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.doc > .muted { margin-top: 10px; font-size: 14px; }
.doc .lead { margin-top: 24px; font-size: 17px; }
.doc section { margin-top: 36px; display: flex; flex-direction: column; gap: 10px; }
.doc section p, .doc section li { font-size: 15.5px; }
.doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc .governing { margin-top: 40px; font-size: 14px; }

/* 히어로 데모: 8초 루프. 텍스트 선택(0–15%) → 「클립」 클릭(16–26%) → 영역 드래그(32–50%) → 저장 파동(56–62%) → 페이드(92–100%) */
.demo { --bar: color-mix(in srgb, var(--ink) 12%, transparent); --hl: color-mix(in srgb, var(--amber) 24%, transparent); }
.demo .page {
  position: relative; max-width: 360px; height: 260px; margin-inline: auto;
  padding: 22px 24px; border-radius: 12px; border: 1px solid var(--line); background: var(--code);
  display: flex; flex-direction: column; gap: 11px; overflow: hidden;
  animation: demo-page 8s linear infinite;
}
.demo .bar { height: 9px; border-radius: 5px; background: var(--bar); }
.demo .bar.t { height: 13px; background: color-mix(in srgb, var(--ink) 22%, transparent); margin-bottom: 4px; }
.demo .w50 { width: 50%; } .demo .w60 { width: 60%; } .demo .w70 { width: 70%; } .demo .w80 { width: 80%; }
.demo .sel { position: relative; display: flex; flex-direction: column; gap: 11px; }
.demo .hl { position: absolute; inset: -4px 0; border-radius: 4px; background: var(--hl); transform: scaleX(0); transform-origin: left; animation: demo-hl 8s linear infinite; }
.demo .pill {
  position: absolute; left: 54%; top: -30px; padding: 3px 8px; border-radius: 999px;
  background: #141414; color: #fff; font-size: 11px; line-height: 1.3; white-space: nowrap;
  opacity: 0; animation: demo-pill 8s linear infinite;
}
.demo .note { position: absolute; right: -8px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); transform: translateY(-50%) scale(0); animation: demo-note 8s linear infinite; }
.demo .img { position: relative; height: 62px; border-radius: 6px; background: var(--bar); }
.demo .img svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.demo .region { fill: none; stroke: var(--amber); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 3 2.5; stroke-dashoffset: 0; opacity: 0; animation: demo-region 8s linear infinite; }
.demo .badge { position: absolute; right: -5px; top: -5px; width: 12px; height: 12px; border-radius: 3px; background: var(--amber); transform: scale(0); animation: demo-badge 8s linear infinite; }
.demo .fab { position: absolute; right: 16px; bottom: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--amber); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(0,0,0,.18); animation: demo-fab 8s linear infinite; }
.demo .fab svg { width: 18px; height: 18px; }
.demo .cursor { position: absolute; width: 16px; height: 16px; left: 30%; top: 33%; animation: demo-cursor 8s linear infinite; }

@keyframes demo-page { 0%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes demo-cursor {
  0% { left: 28%; top: 30%; transform: scale(1); }
  15% { left: 74%; top: 38%; transform: scale(1); }
  20% { left: 58%; top: 28%; transform: scale(1); }
  24% { left: 58%; top: 28%; transform: scale(.85); }
  26% { left: 58%; top: 28%; transform: scale(1); }
  32% { left: 12%; top: 57%; }
  50% { left: 86%; top: 80%; }
  56% { left: 86%; top: 80%; }
  62% { left: 90%; top: 86%; }
  90%, 100% { left: 90%; top: 86%; }
}
@keyframes demo-hl { 0% { transform: scaleX(0); } 15%, 100% { transform: scaleX(1); } }
@keyframes demo-pill { 0%, 15% { opacity: 0; transform: translateY(4px); } 17%, 23% { opacity: 1; transform: translateY(0); } 25%, 100% { opacity: 0; transform: translateY(0); } }
@keyframes demo-note { 0%, 25% { transform: translateY(-50%) scale(0); } 28%, 100% { transform: translateY(-50%) scale(1); } }
@keyframes demo-region { 0%, 32% { opacity: 1; stroke-dashoffset: 100; stroke-dasharray: 100 100; } 50%, 100% { opacity: 1; stroke-dashoffset: 0; stroke-dasharray: 100 100; } }
@keyframes demo-badge { 0%, 50% { transform: scale(0); } 53%, 100% { transform: scale(1); } }
@keyframes demo-fab { 0%, 56% { box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 0 0 0 color-mix(in srgb, var(--amber) 45%, transparent); } 62% { box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 0 0 14px color-mix(in srgb, var(--amber) 0%, transparent); } 63%, 100% { box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 0 0 0 color-mix(in srgb, var(--amber) 0%, transparent); } }

@media (prefers-reduced-motion: reduce) {
  .demo * { animation: none; }
  .demo .hl { transform: scaleX(1); }
  .demo .note { transform: translateY(-50%) scale(1); }
  .demo .region { opacity: 1; stroke-dashoffset: 0; }
  .demo .badge { transform: scale(1); }
  .demo .pill, .demo .cursor { display: none; }
}

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .features ol { grid-template-columns: 1fr; gap: 20px; }
  main { gap: 56px; padding-top: 40px; }
  .top nav { gap: 12px; }
  .top nav a:not(.btn):first-child { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: filter 120ms ease; }
}
