/* 공통 리셋 + 페이지 골격 */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 480px at 50% -120px, rgba(245, 165, 36, 0.07), transparent 65%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* 미세 그레인 — 프리미엄 질감 (외부 요청 없음) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── 헤더 ── */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 58px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  letter-spacing: 0.01em;
}
.logo .cap-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(180deg, var(--keycap-hi), var(--keycap-lo));
  border: 1px solid var(--accent);
  box-shadow: 0 2px 0 var(--skirt);
  color: var(--accent);
  font-size: 14px;
}
.logo .kr { color: var(--text-dim); font-weight: 400; font-size: 13px; font-family: var(--font); }

nav.tools { display: flex; gap: 18px; margin-left: auto; font-size: 14px; }
nav.tools .now { color: var(--accent); font-weight: 700; }
nav.tools .soon {
  color: var(--text-dim);
  opacity: 0.6;
  cursor: default;
}
nav.tools .soon i {
  font-style: normal;
  font-size: 10px;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: 1px;
}

/* ── 히어로 ── */
.hero { padding: 42px 0 26px; }
h1 {
  margin: 0 0 10px;
  font-size: clamp(27px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}
.sub { margin: 0; color: var(--text-dim); max-width: 760px; font-size: 15.5px; }

/* ── 섹션 공통 ── */
main section { margin: 34px 0; }
.sec-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 6px;
}
h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 14px; }

.kb-note {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
  color: var(--text-dim);
  margin: 12px 2px 0;
}
.kb-note b { color: var(--accent); font-weight: 700; }

/* ── 본문(SEO) ── */
.prose { max-width: 860px; color: var(--text); }
.prose p, .prose li { color: var(--text-dim); font-size: 15px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
.prose ol li::marker { color: var(--accent); font-weight: 700; }
.prose ul li::marker { color: var(--accent); }

details.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 18px;
  margin: 10px 0;
  max-width: 860px;
}
details.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 0;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 18px;
}
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--text-dim); font-size: 14.5px; margin: 0 0 14px; }

/* ── 도구 그리드 (메인) ── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
a.tool-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--text);
  transition: border-color 0.15s;
}
a.tool-card:hover { border-color: var(--accent); text-decoration: none; }
.tool-card b { display: block; font-size: 15px; margin-bottom: 4px; }
.tool-card span { color: var(--text-dim); font-size: 13px; line-height: 1.5; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tool-grid { grid-template-columns: 1fr; } }

/* ── 키보드 상단 액션 바 ── */
.kb-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

/* ── 버튼 ── */
.btn {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  border-radius: 10px;
  padding: 9px 18px;
  cursor: pointer;
  transition: filter 0.15s, border-color 0.15s, color 0.15s;
}
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-solid {
  background: var(--accent);
  color: #241a04;
  border: 1px solid var(--accent);
}
.btn-solid:hover { filter: brightness(1.08); }

/* ── 푸터 ── */
footer.site {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
  font-size: 13px;
  color: var(--text-dim);
}
footer.site .priv { margin-top: 6px; opacity: 0.8; }

@media (max-width: 760px) {
  header.site .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  nav.tools {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
    gap: 16px;
    font-size: 13px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  nav.tools::-webkit-scrollbar { display: none; }
  nav.tools a, nav.tools .now, nav.tools .soon { flex: none; white-space: nowrap; }
  nav.tools .soon i { display: none; }
  .hero { padding: 30px 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
