/* 이음로직스 공식 홈페이지 — 공통 스타일
   설계 원칙: 외부 요청 0(폰트·스크립트 전부 로컬/시스템), 라이트·다크 대응, 모바일 우선. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --bg-card: #ffffff;
  --fg: #16202c;
  --fg-muted: #56657a;
  --fg-faint: #8593a5;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #1a3274;
  --brand-soft: #eef2fb;
  --brand-fg: #ffffff;
  --accent: #c2760a;
  --warn-bg: #fff8e6;
  --warn-line: #f0d68a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 52, .06), 0 8px 24px rgba(16, 32, 52, .05);
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1420;
    --bg-soft: #141c2b;
    --bg-card: #16203046;
    --bg-card: #16202f;
    --fg: #e7edf5;
    --fg-muted: #a3b1c4;
    --fg-faint: #78889d;
    --line: #24314570;
    --line: #253145;
    --line-strong: #33425c;
    --brand: #7fa5f0;
    --brand-soft: #18244a;
    --brand-fg: #08101d;
    --accent: #f59e0b;
    --warn-bg: #2a2413;
    --warn-line: #5c4d21;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  --bg: #0e1420;
  --bg-soft: #141c2b;
  --bg-card: #16202f;
  --fg: #e7edf5;
  --fg-muted: #a3b1c4;
  --fg-faint: #78889d;
  --line: #253145;
  --line-strong: #33425c;
  --brand: #7fa5f0;
  --brand-soft: #18244a;
  --brand-fg: #08101d;
  --accent: #f59e0b;
  --warn-bg: #2a2413;
  --warn-line: #5c4d21;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "맑은 고딕", "Noto Sans KR", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}

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

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 22px; height: 62px; }
.logo { font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--fg); text-decoration: none; white-space: nowrap; }
.logo span { color: var(--brand); }
.nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--fg-muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); }
.nav .cta {
  background: var(--brand); color: var(--brand-fg);
  padding: 7px 15px; border-radius: 999px;
}
.nav .cta:hover { color: var(--brand-fg); opacity: .9; }

@media (max-width: 720px) {
  .site-header .wrap { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 12px; }
  .nav { margin-left: 0; width: 100%; gap: 14px; }
  .nav a { font-size: 14px; }
}

/* ---------- 히어로 ---------- */
.hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.hero .eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  color: var(--brand); background: var(--brand-soft);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.3; letter-spacing: -.03em; margin: 0 0 18px; font-weight: 800; }
.hero .lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--fg-muted); max-width: 46em; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: var(--brand-fg); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 섹션 ---------- */
section { padding: 56px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
h2 { font-size: clamp(22px, 3.4vw, 30px); letter-spacing: -.025em; margin: 0 0 10px; font-weight: 800; line-height: 1.35; }
h3 { font-size: clamp(18px, 2.6vw, 21px); letter-spacing: -.02em; margin: 32px 0 10px; font-weight: 700; line-height: 1.45; }
.section-lede { color: var(--fg-muted); margin: 0 0 28px; max-width: 48em; }
p { margin: 0 0 16px; }
a { color: var(--brand); }

/* ---------- 지표 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 8px 0 0; }
.stat { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; }
.stat .num { font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -.03em; color: var(--fg); display: block; line-height: 1.2; }
.stat .label { font-size: 14px; color: var(--fg-muted); font-weight: 600; }
.stat .sub { font-size: 12px; color: var(--fg-faint); }

/* ---------- 카드 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .tag { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }

/* ---------- 목록 ---------- */
ul, ol { margin: 0 0 18px; padding-left: 1.3em; }
li { margin-bottom: 8px; }
.checks { list-style: none; padding-left: 0; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 800;
}

/* ---------- 표 ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 520px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg-soft); font-weight: 700; font-size: 14px; color: var(--fg-muted); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { margin: 0 0 10px; font-size: 19px; }
.faq-item p:last-child { margin-bottom: 0; }
.faq-item .answer { color: var(--fg-muted); }

/* ---------- 알림 박스 ---------- */
.note {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: var(--radius); padding: 18px 20px; font-size: 15px; color: var(--fg-muted);
}
.note strong { color: var(--fg); }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 44px 0 36px; font-size: 14px; color: var(--fg-muted); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-bottom: 28px; }
.footer-grid h4 { font-size: 14px; font-weight: 700; color: var(--fg); margin: 0 0 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: var(--fg-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--brand); }
.legal { border-top: 1px solid var(--line); padding-top: 20px; font-size: 13px; color: var(--fg-faint); line-height: 1.85; }

/* ---------- 브레드크럼 ---------- */
.crumb { font-size: 14px; color: var(--fg-faint); padding: 20px 0 0; }
.crumb a { color: var(--fg-muted); text-decoration: none; }
.crumb a:hover { color: var(--brand); }

/* ---------- 요약 박스(답변엔진 인용 대상) ---------- */
.answer-box {
  background: var(--brand-soft); border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 22px; margin: 0 0 28px;
}
.answer-box p:last-child { margin-bottom: 0; }
.answer-box strong { color: var(--fg); }

/* ---------- 다이어그램 ----------
   전부 인라인 SVG. 외부 요청 0, currentColor 기반이라 라이트·다크 자동 대응.
   AI 크롤러는 이미지를 못 읽으므로 <title>/<desc>와 본문 요약을 반드시 함께 둔다. */
.figure {
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
}
.figure > svg { display: block; width: 100%; height: auto; }
.figure figcaption {
  padding: 12px 18px 14px;
  font-size: 14px;
  color: var(--fg-muted);
  border-top: 1px solid var(--line);
  background: var(--bg-card);
}
.figure figcaption strong { color: var(--fg); }

/* SVG 내부 공통 토큰 */
.dg { --dg-line: var(--line-strong); --dg-fill: var(--bg-card); }
.dg text { font-family: inherit; fill: var(--fg); }
.dg .t-sm { font-size: 12px; fill: var(--fg-muted); }
.dg .t-md { font-size: 14px; font-weight: 700; }
.dg .t-lg { font-size: 16px; font-weight: 800; }
.dg .t-num { font-size: 22px; font-weight: 800; fill: var(--brand); }
.dg .box { fill: var(--bg-card); stroke: var(--line-strong); stroke-width: 1.5; }
.dg .box-brand { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 1.5; }
.dg .box-accent { fill: var(--warn-bg); stroke: var(--warn-line); stroke-width: 1.5; }
.dg .arrow { stroke: var(--line-strong); stroke-width: 1.8; fill: none; }
.dg .arrow-brand { stroke: var(--brand); stroke-width: 2; fill: none; }
.dg .head { fill: var(--line-strong); }
.dg .head-brand { fill: var(--brand); }
.dg .band { fill: var(--brand); opacity: .08; }
.dg .band-line { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.dg .accent { fill: var(--accent); }
.dg .muted { fill: var(--fg-faint); }

/* 아이콘 */
.ico { width: 34px; height: 34px; display: block; margin-bottom: 12px; color: var(--brand); }
.ico svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.7;
           stroke-linecap: round; stroke-linejoin: round; }

/* 히어로에 다이어그램이 들어갈 때의 2단 배치 */
.hero-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-split { grid-template-columns: 1fr; gap: 28px; } }
