/* Biencity Services — shared stylesheet. No external fonts or libraries. */

:root {
  --bg: #ffffff;
  --surface: #f5f6f7;
  --text: #1d2125;
  --muted: #5a636c;
  --rule: #e2e5e9;
  --accent: #1d5a78;
  --accent-soft: #e8f0f4;
  --review-bg: #fff4cc;
  --review-fg: #6b4e00;
  --radius: 10px;
  --wrap: 68rem;
  --measure: 44rem;
  --font: "Pretendard", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "D2Coding", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1c1f23;
    --text: #e6e8eb;
    --muted: #9ba4ae;
    --rule: #2b3036;
    --accent: #8cc0dc;
    --accent-soft: #1d2a32;
    --review-bg: #3a3112;
    --review-fg: #f1d98a;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -3rem;
  padding: 0.5rem 0.9rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 6px;
  z-index: 10;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 48rem) {
  .wrap {
    padding: 0 2rem;
  }
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Typography */

h1,
h2,
h3 {
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
  font-weight: 700;
}

h3 {
  font-size: 1.1rem;
  font-weight: 650;
}

p {
  margin: 0 0 1rem;
}

.en {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Home sections */

.hero {
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero h1 {
  max-width: 20ch;
}

.hero .lead {
  max-width: var(--measure);
  margin-top: 1.5rem;
  font-size: 1.15rem;
  color: var(--text);
}

.hero .en {
  max-width: var(--measure);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  border-color: var(--muted);
}

.button.primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.section {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--rule);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: 2rem;
}

.section-head h2 {
  margin-bottom: 0.9rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  margin: 0;
  font-size: 0.98rem;
}

.card .en {
  margin-top: 0.6rem;
  font-size: 0.88rem;
}

.prose {
  max-width: var(--measure);
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.prose li {
  margin: 0.35rem 0;
}

.note {
  max-width: var(--measure);
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

.note p:last-child {
  margin-bottom: 0;
}

.contact-mail {
  display: inline-block;
  margin: 0.25rem 0 1rem;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem);
  font-weight: 650;
}

/* Policy page */

.doc {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 4rem;
}

.doc-head {
  max-width: var(--measure);
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.doc-head h1 {
  margin-bottom: 0.4rem;
}

.doc-meta {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.doc-meta dt {
  display: inline;
  font-weight: 600;
}

.doc-meta dd {
  display: inline;
  margin: 0 1.25rem 0 0.4rem;
}

.toc {
  max-width: var(--measure);
  margin: 2rem 0 0;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.toc h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.3rem;
  columns: 2 15rem;
  column-gap: 2rem;
}

.toc li {
  margin: 0.2rem 0;
  break-inside: avoid;
}

.doc section {
  max-width: var(--measure);
  padding-top: 2.25rem;
  scroll-margin-top: 1rem;
}

.doc section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}

.doc section h3 {
  font-size: 1.02rem;
  margin: 1.4rem 0 0.5rem;
}

.doc section ul,
.doc section ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.doc section li {
  margin: 0.35rem 0;
}

.doc table {
  width: 100%;
  margin: 0 0 1rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.doc th,
.doc td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.doc th {
  font-weight: 600;
  color: var(--muted);
}

.doc tbody th[scope="row"] {
  width: 32%;
}

.doc section.table-scroll {
  margin: 0 0 1rem;
  padding-top: 0;
  overflow-x: auto;
}

.table-scroll table {
  margin: 0;
}

.table-scroll table:has(thead th:nth-child(3)) {
  min-width: 34rem;
}

.doc td code {
  overflow-wrap: anywhere;
}

.quote {
  margin: 0 0 1rem;
  padding: 1rem 1.2rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.quote p:last-child {
  margin-bottom: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  background: var(--surface);
  border-radius: 4px;
}

/* Draft markers — every one must be resolved before publishing. */

.review {
  display: inline-block;
  margin: 0 0.25rem 0 0;
  padding: 0 0.45rem;
  background: var(--review-bg);
  color: var(--review-fg);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.7;
  vertical-align: 0.08em;
}

.draft-banner {
  margin: 0;
  padding: 0.7rem 16px;
  background: var(--review-bg);
  color: var(--review-fg);
  font-size: 0.92rem;
  text-align: center;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.site-footer p {
  margin: 0;
}

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

@media print {
  .site-nav,
  .skip-link,
  .actions {
    display: none;
  }
}
