/* PhoneBridge site — no external fonts or libraries. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #4a4a4f;
  --text-3: #6e6e73;
  --line: #d9d9de;
  --accent: #0a66d8;
  --accent-hover: #0857ba;
  --accent-text: #ffffff;
  --green: #1a9c57;
  --code-bg: #f0f0f3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .06);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --bg-soft: #1b1b1e;
    --surface: #1f1f23;
    --text: #f5f5f7;
    --text-2: #c7c7cc;
    --text-3: #98989f;
    --line: #34343a;
    --accent: #3d8bfd;
    --accent-hover: #5c9dff;
    --accent-text: #ffffff;
    --green: #3ccf7f;
    --code-bg: #26262b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR",
        "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

/* 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(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; font-size: 14px; }
.site-nav a { color: var(--text-2); }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.lang {
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
  font-size: 13px; color: var(--text-2) !important;
}

/* Hero */
.hero { padding: 72px 0 56px; text-align: center; }
.hero-icon { width: 144px; height: 144px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .18)); }
.hero h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.15; letter-spacing: -.02em; margin: 20px 0 14px; }
.hero .lead { font-size: clamp(18px, 2.4vw, 21px); color: var(--text-2); max-width: 640px; margin: 0 auto 28px; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-size: 16px; font-weight: 600;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-secondary:hover { border-color: var(--text-3); }
.btn svg { width: 18px; height: 18px; }
.meta { margin-top: 16px; font-size: 14px; color: var(--text-3); }
.meta span { white-space: nowrap; }
.meta span + span::before { content: "·"; margin: 0 8px; }

/* Sections */
section { padding: 64px 0; }
section.soft { background: var(--bg-soft); }
h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.015em; line-height: 1.25; margin: 0 0 10px; }
.section-lead { color: var(--text-2); margin: 0 0 32px; max-width: 680px; }
h3 { font-size: 18px; margin: 0 0 6px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.card .ico {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); margin-bottom: 14px;
}
.card .ico.green { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.card .ico svg { width: 22px; height: 22px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; margin-left: 6px; vertical-align: 2px;
}

/* Privacy band */
.privacy-band { display: flex; gap: 28px; align-items: center; }
.privacy-band .shield { flex: none; width: 88px; height: 88px; color: var(--green); }
@media (max-width: 600px) { .privacy-band { flex-direction: column; align-items: flex-start; } }

/* Install */
.install { display: grid; gap: 16px; }
.install .card h3 { display: flex; align-items: center; gap: 10px; }
.install .card > p { margin-bottom: 12px; }
.code {
  position: relative; display: flex; align-items: flex-start; gap: 8px;
  background: var(--code-bg); border-radius: 10px; padding: 12px 14px; margin-top: 8px;
}
.code code {
  flex: 1; min-width: 0; font: 14px/1.55 ui-monospace, "SF Mono", Menlo, monospace;
  white-space: pre-wrap; word-break: break-all; color: var(--text);
}
.copy {
  flex: none; font: 600 12px/1 -apple-system, BlinkMacSystemFont, sans-serif; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; cursor: pointer;
}
.copy:hover { color: var(--text); }
.note { font-size: 14px; color: var(--text-3); margin: 8px 0 0; }

/* Lists and tables */
.req { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.req li { position: relative; padding-left: 16px; }
.req li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-3); font-weight: 600; font-size: 13px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-scroll table tr:last-child td { border-bottom: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }

/* Document pages */
.doc { padding: 48px 0 72px; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -.02em; line-height: 1.2; margin: 0 0 8px; }
.doc .updated { color: var(--text-3); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font-size: 24px; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--text-2); }
.doc ul { padding-left: 22px; }
.summary {
  background: color-mix(in srgb, var(--green) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line));
  border-radius: var(--radius); padding: 18px 20px; color: var(--text);
}
.summary p { color: var(--text); margin: 0; }
code.inline { font: 14px ui-monospace, "SF Mono", Menlo, monospace; background: var(--code-bg); border-radius: 5px; padding: 1px 5px; }

details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 20px; margin-bottom: 12px;
}
details[open] { padding-bottom: 16px; }
summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--text-3); font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p, details ol, details ul { margin: 0 0 10px; color: var(--text-2); }
details ol, details ul { padding-left: 22px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 13px; color: var(--text-3); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.site-footer nav a { color: var(--text-2); }
.site-footer p { margin: 4px 0; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-nav .hide-sm { display: none; }
  .site-nav { gap: 14px; }
  .hero { padding: 48px 0 40px; }
  .hero-icon { width: 112px; height: 112px; }
  section { padding: 48px 0; }
}
