:root {
  --bg: #fbfaf9;
  --bg-alt: #f3f0ee;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #5f5f66;
  --border: #e5e1de;
  --accent: #d6263d;
  --accent-2: #ff7361;
  --accent-text: #b81d32;
  --on-accent: #ffffff;
  --code-bg: #f1edea;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --bg-alt: #1b1b1e;
    --surface: #222226;
    --text: #f2f2f4;
    --muted: #a6a6ae;
    --border: #34343a;
    --accent-text: #ff8a7c;
    --code-bg: #2a2a2f;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.3);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--accent-text); }
a:hover { text-decoration-thickness: 2px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  white-space: nowrap;
}

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 20;
}
.skip:focus { left: 16px; }

pre {
  margin: 12px 0; padding: 14px 16px; overflow-x: auto;
  background: var(--code-bg); border-radius: 12px; font-size: 15px; line-height: 1.5;
}
pre code { background: none; padding: 0; font-size: inherit; white-space: pre-wrap; word-break: break-all; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 20px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.lang {
  font-size: 14px; color: var(--text); text-decoration: none;
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; white-space: nowrap;
}
.lang:hover { background: var(--bg-alt); }

/* Hero */
.hero { padding: 72px 0 64px; text-align: center; }
.hero-icon { width: 152px; height: 152px; margin: 0 auto 12px; display: block; filter: drop-shadow(0 12px 24px rgb(214 38 61 / 0.25)); }
.hero h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero .lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 640px; margin: 0 auto 32px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--on-accent); text-decoration: none; font-weight: 600; font-size: 18px;
  padding: 14px 28px; border-radius: 14px; box-shadow: 0 6px 18px rgb(214 38 61 / 0.3);
}
.btn:hover { filter: brightness(1.05); }
.btn:focus-visible, .lang:focus-visible, .nav a:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.btn svg { width: 20px; height: 20px; }
.btn-meta { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.btn-alt { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.btn-alt code { white-space: normal; word-break: break-all; }

/* Sections */
section { padding: 64px 0; }
section.alt { background: var(--bg-alt); }
section h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.01em; margin: 0 0 12px; }
.section-lead { color: var(--muted); max-width: 720px; margin: 0 0 32px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.card h3 .ico {
  flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff;
}
.card h3 .ico svg { width: 19px; height: 19px; }
.card p { margin: 0 0 8px; color: var(--muted); }
.card ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 15.5px; }
.card li { margin: 4px 0; }

.req { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 0; }
.req div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.req dt { font-size: 14px; color: var(--muted); }
.req dd { margin: 4px 0 0; font-weight: 600; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; max-width: 760px; }
.steps li { counter-increment: step; position: relative; padding: 2px 0 0 52px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
}
.steps li > strong { display: block; }
.steps p { margin: 2px 0 0; color: var(--muted); }

.brew {
  max-width: 760px; margin-top: 36px; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
}
.brew h3 { margin: 0 0 6px; font-size: 19px; }
.brew p { margin: 0; color: var(--muted); }

.faq { display: grid; gap: 14px; max-width: 860px; }
.qa { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; }
.qa h3 { margin: 0 0 6px; font-size: 18px; }
.qa p { margin: 0; color: var(--muted); }
.qa code { white-space: normal; word-break: break-all; }

.prose > * { max-width: 760px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
.note {
  border-left: 4px solid var(--accent); background: var(--surface);
  padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 20px 0 0;
}
.note p { margin: 0; }

.contact-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.contact-box a { font-size: 20px; font-weight: 600; }

.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer p { margin: 0; }

@media (max-width: 760px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .hero { padding: 48px 0 48px; }
  .hero-icon { width: 120px; height: 120px; }
  section { padding: 48px 0; }
  .features { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .btn { width: 100%; justify-content: center; }
}

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