/* SNSAgent 공통 디자인 v4 — "대형 금융사" 톤 (doc/START/10_디자인방향.md)
   기업 파랑 한 가지만 쓴다(강조색 하나). 바탕은 흰색과 차가운 연회색.
   모서리 규칙: 카드·이미지 12px, 버튼·입력칸 8px, 작은 표시 6px. 페이지 전체가 같은 규칙.
   시니어 기준: 본문 18px, 대비 7:1, 버튼 높이 56px 이상. 밝은 화면 하나로 고정(금융 고객용). */

@import url("motion.css"); /* 움직임 (motion.js 와 짝) */
@import url("kit.css");    /* 색 체계 v6 · 색 아이콘 칸 · 채널 표 · 도넛 */

/* 화면 사이 옮김 허용은 여기에 직접 둔다 (@import 로 불러온 CSS의 허용은 Chrome이 인정하지 않음) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: sa-vt-out .18s cubic-bezier(.4, 0, 1, 1) both; }
  ::view-transition-new(root) { animation: sa-vt-in .42s var(--ease) both; }
  .side { view-transition-name: sa-side; }
  .proto-bar { view-transition-name: sa-proto; }
  ::view-transition-group(sa-side), ::view-transition-group(sa-proto) { animation-duration: 0s; }
}
@keyframes sa-vt-out { to { opacity: 0; } }
@keyframes sa-vt-in { from { opacity: 0; transform: translateY(12px); } }

:root {
  color-scheme: light;

  /* 기업 색 — 강조색은 brand 하나 */
  --brand: #1A4FBA;        /* 주 버튼·링크·강조 (흰 글자 대비 7.6:1) */
  --brand-hover: #153F96;
  --brand-deep: #0F2E6E;   /* 짙은 면: 결과 보고 메뉴, 정보 칸 */
  --brand-tint: #EEF3FC;   /* 아주 옅은 파랑 면 */
  --brand-line: #C9D7F2;   /* 옅은 파랑 선 */

  --ink: #111827;          /* 제목·본문 */
  --slate: #4B5563;        /* 보조 글자 (흰 바탕 대비 7.6:1) */
  --muted-2: #6B7280;      /* 아주 작은 보조 글자는 쓰지 않는다(대비 부족) — 장식용 */
  --paper: #FFFFFF;
  --ivory: #F5F7FA;        /* 연회색 띠 (이전 이름 유지) */
  --ivory-2: #FAFBFC;
  --stone: #E5E7EB;        /* 선 */
  --stone-2: #F1F3F6;      /* 옅은 면 */
  --on-dark: #C8D3EA;      /* 짙은 파랑 위 보조 글자 */
  --teal: #0F6B5E;         /* 상태: 완료 */
  --teal-bg: #E6F2EF;
  --danger: #B42318;
  --focus: #B45309;
  --kakao: #FEE500;

  /* 이전 이름 호환 (다른 화면이 쓰는 이름) */
  --navy: var(--brand-deep);
  --navy-2: #163B85;
  --navy-3: var(--brand);
  --gold: #9DB9F2;         /* 짙은 파랑 위 강조선 (옅은 파랑) */
  --bronze: var(--brand);
  --bronze-ink: var(--brand);

  --c1: #1A4FBA; --c2: #0F6B5E; --c3: #7C93C9; --c4: #9CA3AF; --c5: #D6DEEC;


  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow-lg: 0 12px 32px rgba(15, 46, 110, .10);
  --hair: 1px solid var(--stone);

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  --wrap: 1200px;
  --narrow: 720px;
}

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }   /* 18px */
html.big { font-size: 131.25%; }                               /* 21px */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); line-height: 1.7; letter-spacing: -0.01em;
  word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.ph { line-height: 1; }

/* ---------- 글자 ---------- */
.kicker { display: block; margin: 0 0 14px; font-size: .95rem; font-weight: 700; color: var(--brand); letter-spacing: -0.01em; }
.on-dark .kicker, .kicker.light { color: var(--gold); }
.eyebrow { display: block; margin: 0 0 10px; font-size: .95rem; font-weight: 700; color: var(--brand); }
.display { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); line-height: 1.25; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 20px; }
.h2 { font-size: clamp(1.55rem, 1.2rem + 1.2vw, 2.1rem); line-height: 1.32; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 14px; }
.h3 { font-size: 1.15rem; line-height: 1.45; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 6px; }
.lead { font-size: 1.08rem; color: var(--slate); margin: 0 0 28px; max-width: 38em; }
.muted { color: var(--slate); }
.small { font-size: .88rem; color: var(--slate); }
.on-dark { color: #fff; }
.on-dark .lead, .on-dark .muted, .on-dark .small { color: var(--on-dark); }

/* ---------- 틀 ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section.tint { background: var(--ivory); }
.section.dark { background: var(--brand-deep); color: #fff; }
@media (max-width: 767px) {
  .wrap, .narrow { padding: 0 20px; }
  .section { padding: 60px 0; }
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 58px; padding: 0 28px; border-radius: var(--radius-sm); border: 1.5px solid var(--brand);
  font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn[hidden] { display: none; }   /* inline-flex 가 hidden 을 덮지 않게 (로그인한 뒤 '로그인' 버튼) */
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ghost { background: var(--paper); color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-gold { background: var(--paper); border-color: var(--paper); color: var(--brand-deep); }
.btn-light { background: transparent; border-color: rgba(255, 255, 255, .75); color: #fff; }
.btn-light:hover { background: rgba(255, 255, 255, .1); }
.btn-kakao { background: var(--kakao); border-color: var(--kakao); color: #191600; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .btn-row .btn { flex: 1 1 100%; } }

/* ---------- 면 ---------- */
.card { background: var(--paper); border: var(--hair); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 32px; }
@media (max-width: 520px) { .pad { padding: 22px; } }

/* ---------- 이미지 자리 (파일이 없으면 이름을 보여 준다) ---------- */
.media { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: linear-gradient(155deg, #E9EEF6 0%, #DCE3EE 100%); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.is-missing::after {
  content: "이미지 자리 · " attr(data-img); position: absolute; inset: auto 12px 12px 12px;
  font-size: .78rem; font-weight: 600; color: var(--slate); background: rgba(255, 255, 255, .85);
  padding: 6px 10px; border-radius: var(--radius-xs); text-align: center;
}
.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-32 { aspect-ratio: 3 / 2; }
.ratio-169 { aspect-ratio: 16 / 9; }
.ratio-11 { aspect-ratio: 1 / 1; }

/* ---------- 칩·표시 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-xs);
  font-size: .8rem; font-weight: 700; background: var(--stone-2); color: var(--ink); white-space: nowrap;
}
.chip.navy { background: var(--brand); color: #fff; }
.chip.teal { background: var(--teal-bg); color: var(--teal); }
.chip.bronze { background: var(--brand-tint); color: var(--brand); }

/* ---------- 입력 ---------- */
.field { margin: 0 0 22px; }
.label { display: block; font-weight: 700; margin: 0 0 8px; }
.label .opt { font-weight: 500; color: var(--slate); font-size: .88rem; margin-left: 6px; }
.input, .select {
  width: 100%; min-height: 58px; padding: 0 16px; border-radius: var(--radius-sm); background: var(--paper);
  border: 1.5px solid #B6BFCC; font-size: 1.05rem;
}
.input::placeholder { color: #6B7280; }
.input:focus, .select:focus { border-color: var(--brand); outline: 3px solid rgba(26, 79, 186, .18); outline-offset: 0; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-weight: 700; font-size: .92rem; margin: 6px 0 0; }

.choices { display: grid; gap: 8px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 12px 18px;
  background: var(--paper); border: 1.5px solid #CBD2DC; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .dot { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid #8A94A6; display: grid; place-items: center; }
.choice.is-on { border-color: var(--brand); background: var(--brand-tint); }
.choice.is-on .dot { border-color: var(--brand); }
.choice.is-on .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.choice:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

/* 개인정보 동의 */
.consent { background: var(--ivory); border: var(--hair); border-radius: var(--radius-sm); padding: 18px 20px; font-size: .88rem; color: var(--slate); }
.consent dl { display: grid; grid-template-columns: 7.5em 1fr; gap: 6px 12px; margin: 0 0 14px; }
.consent dt { font-weight: 700; color: var(--ink); }
.consent dd { margin: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 700; color: var(--ink); font-size: 1rem; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--brand); flex: 0 0 auto; }

/* ---------- 법적 표시 ---------- */
.legal { padding: 40px 0 56px; border-top: var(--hair); font-size: .84rem; color: var(--slate); line-height: 1.75; }
.legal p { margin: 0 0 4px; }
.legal strong { color: var(--ink); font-weight: 700; }

/* ---------- SNSAgent 로고 (회사 화면 · 업무 화면 공통) ---------- */
.sa-logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.sa-logo svg { width: 34px; height: 34px; flex: 0 0 34px; }
.sa-logo b { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.025em; }
.sa-logo small { display: block; font-size: .72rem; font-weight: 600; color: var(--slate); letter-spacing: 0; margin-top: -2px; }
.on-ink .sa-logo small { color: var(--text-dark-2); }

/* ---------- 시제품 표시 막대 (v5: 얇고 옅게 — 실제 화면을 가리지 않도록) ---------- */
/* 시제품 막대: 손님에게는 숨긴다. 시제품 모음(hub/)을 연 브라우저에만 html.sa-proto 가 붙어 보인다 (기록 43) */
.proto-bar { display: none; }
html.sa-proto .proto-bar { display: block; }
.proto-bar { background: #EEF1F6; color: var(--slate); font-size: .76rem; border-bottom: 1px solid #E1E5EC; }
.proto-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; flex-wrap: wrap; padding-top: 3px; padding-bottom: 3px; }
.proto-bar a { color: var(--brand); font-weight: 600; }
.proto-bar button { color: var(--brand) !important; }
.seg { display: inline-flex; border: 1px solid #D5DBE5; border-radius: var(--radius-xs); overflow: hidden; background: #fff; }
.seg a, .seg button {
  padding: 3px 12px; color: var(--slate); text-decoration: none; background: none; border: 0; cursor: pointer; font-weight: 700; min-height: 26px; font-size: .76rem;
}
.seg [aria-current="page"], .seg .is-on { background: var(--brand-deep); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
