/* voicetotext 소개 사이트
   kanghome.dev와 같은 색 계열, 단일 페이지용
   ─ 타이포 스케일과 여백은 0.25rem 배수로 통일했다. */

:root {
  /* 색 */
  --bg: #fcfbf9;
  --bg-soft: #f4f2ee;
  --fg: #171614;
  --fg-strong: #000000;
  --muted: #6f6c66;
  --muted-soft: #96938c;
  --line: #e7e3db;
  --line-soft: #efebe4;
  --accent: #b45309;
  --accent-hover: #92400e;
  --accent-soft: #fef3c7;
  --card: #ffffff;
  --code-bg: #f4f2ed;
  --warn-fg: #8a5a12;
  --warn-bg: #fdf3e0;

  /* 형태 */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;

  /* 여백 스케일 */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.75rem;
  --sp-8: 3.5rem;
  --sp-9: 4.5rem;

  /* 레이아웃 */
  --wrap: 47rem;
  --measure: 34rem;

  --shadow-sm: 0 1px 2px rgba(23, 22, 20, 0.05);
  --shadow: 0 1px 3px rgba(23, 22, 20, 0.05), 0 10px 30px -12px rgba(23, 22, 20, 0.14);

  /* 타이포 */
  --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'Liberation Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101010;
    --bg-soft: #171717;
    --fg: #e9e6e0;
    --fg-strong: #ffffff;
    --muted: #9c9992;
    --muted-soft: #75726c;
    --line: #262624;
    --line-soft: #1e1e1c;
    --accent: #f0b429;
    --accent-hover: #f5c451;
    --accent-soft: #2a2214;
    --card: #181817;
    --code-bg: #1d1d1c;
    --warn-fg: #e6bd7e;
    --warn-bg: #2a2114;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  }
}

/* ── 기본 ───────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.75;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1;
  word-break: keep-all; /* 한국어가 단어 중간에서 끊기지 않게 */
  overflow-wrap: anywhere;
}

/* 한국어는 영문보다 줄 높이를 조금 넉넉하게 */
:lang(ko) body,
body:lang(ko) {
  line-height: 1.78;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 4vw, 1.75rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--card);
  color: var(--fg);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

::selection {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 헤더 ───────────────────────────────────────── */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

header.site .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 3.75rem;
  padding: var(--sp-2) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.97rem;
  font-weight: 650;
  letter-spacing: -0.022em;
  color: var(--fg-strong);
  text-decoration: none;
  white-space: nowrap;
}

.brand .mark {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 5px;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}

.brand .mark span {
  display: block;
  width: 1.5px;
  height: 0.6rem;
  border-radius: 2px;
  background: var(--bg);
  box-shadow: -3.6px 0 0 var(--bg), 3.6px 0 0 var(--bg);
}

.brand small {
  color: var(--muted-soft);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: -0.005em;
}

nav.site {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.2vw, 1.35rem);
  font-size: 0.885rem;
  letter-spacing: -0.008em;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}

nav.site a:hover,
nav.site a:focus-visible {
  color: var(--accent);
}

nav.site a.ext::after {
  content: '↗';
  display: inline-block;
  margin-left: 0.2em;
  font-size: 0.82em;
  color: var(--muted-soft);
  transform: translateY(-0.05em);
}

@media (max-width: 660px) {
  .brand small {
    display: none;
  }
  nav.site a.ext {
    display: none;
  }
}

/* ── 히어로 ─────────────────────────────────────── */

main {
  padding: 0 0 clamp(3rem, 7vw, 4.75rem);
}

.hero {
  position: relative;
  padding: clamp(3.25rem, 8vw, 5.5rem) 0 clamp(2.5rem, 5vw, 3.25rem);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -55% -12% auto;
  height: 560px;
  background: radial-gradient(
      52% 50% at 20% 10%,
      color-mix(in srgb, var(--accent) 15%, transparent),
      transparent 72%
    ),
    radial-gradient(
      42% 42% at 84% -2%,
      color-mix(in srgb, var(--accent) 8%, transparent),
      transparent 72%
    );
  pointer-events: none;
}

.hero > * {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.735rem;
  font-weight: 600;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 0.32rem 0.78rem 0.3rem;
  margin: 0 0 1.5rem;
}

.eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

h1 {
  font-size: clamp(2.1rem, 5.4vw, 2.95rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 1.15rem;
  color: var(--fg-strong);
  text-wrap: balance;
}

:lang(ko) h1 {
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.105rem);
  line-height: 1.78;
  color: var(--muted);
  margin: 0 0 2.15rem;
  max-width: var(--measure);
  text-wrap: pretty;
}

.lede strong {
  color: var(--fg);
  font-weight: 600;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 2.35rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.66rem 1.15rem;
  text-decoration: none;
  color: var(--fg);
  font-size: 0.92rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease,
    background-color 0.18s ease;
}

.button:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1c1206;
  font-weight: 600;
}

.button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

@media (prefers-color-scheme: dark) {
  .button.primary {
    color: #0b1413;
    font-weight: 600;
  }
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badges li {
  font-size: 0.775rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.24rem 0.72rem;
  box-shadow: var(--shadow-sm);
}

/* ── 섹션 ───────────────────────────────────────── */

section {
  margin: 0 0 clamp(2.75rem, 6vw, 4rem);
}

section + section {
  padding-top: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line-soft);
}

h2 {
  font-size: clamp(1.24rem, 2.4vw, 1.375rem);
  line-height: 1.4;
  letter-spacing: -0.028em;
  font-weight: 650;
  margin: 0 0 0.4rem;
  color: var(--fg-strong);
  text-wrap: balance;
}

.section-head {
  margin: 0 0 var(--sp-5);
  max-width: var(--measure);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.945rem;
  line-height: 1.7;
  text-wrap: pretty;
}

p {
  margin: 0 0 var(--sp-4);
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* ── 카드 ───────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 0.75rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.2s ease, transform 0.18s ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 0.945rem;
  line-height: 1.45;
  font-weight: 620;
  letter-spacing: -0.018em;
  margin: 0 0 0.4rem;
  color: var(--fg-strong);
}

.card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.66;
  color: var(--muted);
  text-wrap: pretty;
}

.card .tag {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.715rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 0.17rem 0.58rem;
}

.card .tag.needs {
  color: var(--warn-fg);
  background: var(--warn-bg);
}

/* ── 코드 ───────────────────────────────────────── */

code {
  background: var(--code-bg);
  border-radius: 5px;
  padding: 0.13rem 0.38rem;
  font-family: var(--font-mono);
  font-size: 0.855em;
  letter-spacing: -0.01em;
  word-break: break-word;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.2rem;
  overflow-x: auto;
  margin: 0 0 var(--sp-4);
  font-size: 0.845rem;
  line-height: 1.75;
  box-shadow: var(--shadow-sm);
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 1em;
  word-break: normal;
}

/* ── 원칙 ───────────────────────────────────────── */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 1.35rem 1.6rem;
}

.principle {
  border-left: 2px solid var(--accent);
  padding: 0.1rem 0 0.1rem 1.05rem;
}

.principle h3 {
  font-size: 0.915rem;
  line-height: 1.5;
  font-weight: 620;
  letter-spacing: -0.018em;
  margin: 0 0 0.32rem;
  color: var(--fg-strong);
}

.principle p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.68;
  color: var(--muted);
  text-wrap: pretty;
}

/* ── 안내 박스 ──────────────────────────────────── */

.note {
  margin: var(--sp-5) 0 0;
  padding: 1.05rem 1.2rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  font-size: 0.895rem;
  line-height: 1.72;
  color: var(--muted);
  text-wrap: pretty;
}

.note strong {
  color: var(--fg);
  font-weight: 620;
}

/* ── 푸터 ───────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--line-soft);
  padding: var(--sp-5) 0;
  color: var(--muted-soft);
  font-size: 0.825rem;
  letter-spacing: -0.005em;
}

footer.site .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
}

footer.site a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer.site a:hover {
  color: var(--accent);
}

/* ── 인쇄 ───────────────────────────────────────── */

@media print {
  header.site,
  footer.site,
  .cta,
  .hero::before {
    display: none;
  }
  body {
    font-size: 10.5pt;
    line-height: 1.55;
    background: #fff;
    color: #000;
  }
  .card,
  .principle {
    break-inside: avoid;
    box-shadow: none;
  }
  a {
    color: #000;
  }
}
