/* S-MON TAX 공통 스타일 — 로그인·서비스소개·개인정보처리방침이 함께 쓴다 */
@import url("../fonts/pretendard-1.3.9/pretendardvariable-dynamic-subset.css");

:root {
  --navy: #26304a;
  --navy-deep: #1b2338;
  /* 흰 글자/파란 바탕 5.5:1, #f7f8fa 위 파란 글자 5.2:1 (WCAG AA) */
  --blue: #1565d0;
  --blue-dark: #0f53b0;
  --blue-soft: #eaf3ff;
  --blue-line: #cfe2ff;
  --yellow: #ffd166;
  --ink: #1a1d24;
  --ink-2: #4a5160;
  --ink-3: #6b7280;   /* 흰 바탕 4.8:1, #f7f8fa 4.6:1 */
  --line: #d9dde5;
  --line-soft: #eceef3;
  --field: #8c929e;   /* 입력칸 테두리 3.1:1 */
  --bg: #f7f8fa;
  --white: #fff;
  --danger: #d93036;  /* 4.7:1 */
  --radius: 10px;
  --shadow: 0 10px 30px rgba(20, 32, 60, .08);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
          "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* 제품명·이메일처럼 중간에서 끊기면 안 되는 말 */
.nowrap { white-space: nowrap; }

/* 초점 표시: 밝은 바탕은 파랑, 어두운 바탕은 노랑 */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.site-header :focus-visible,
.hero :focus-visible,
.contact :focus-visible,
.site-footer :focus-visible { outline-color: var(--yellow); }
main:focus { outline: none; }

/* 본문 바로가기: 평소엔 숨기고 Tab 으로 초점이 오면 보인다 */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  padding: 10px 16px; background: #fff; color: var(--ink); font-weight: 700; border-radius: 6px;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- 상단 바 ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
}
.site-header__inner {
  height: 72px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 32px; height: 32px; }
.brand__text { font-size: 22px; font-weight: 800; letter-spacing: .02em; line-height: 1; white-space: nowrap; }
.brand__text b { color: var(--yellow); font-weight: 800; margin-left: 4px; }
.brand__text--light { color: #fff; }
.site-header__link { font-size: 16px; opacity: .92; padding: 8px 4px; }
.site-header__link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 8px;
  padding: 0 22px; min-height: 48px; font-size: 16px; font-weight: 700;
  transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--ghost { background: #fff; color: var(--blue-dark); border-color: var(--blue); }
.btn--ghost:hover { background: var(--blue-soft); }
.btn--block { width: 100%; }

/* ---------- 입력 ---------- */
.field { position: relative; }
.field + .field { margin-top: 14px; }
.field__label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field__box { position: relative; }
.input {
  width: 100%; height: 50px; padding: 0 16px;
  border: 1px solid var(--field); border-radius: 8px; background: #fff;
  font-size: 17px;
}
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 2px var(--blue); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 2px var(--danger); }
.field__toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink-3);
  display: grid; place-items: center; border-radius: 6px;
}
.field__toggle:hover { color: var(--ink); }
.field__toggle[aria-pressed="true"] { color: var(--blue); }
.field__toggle .icon-off { display: none; }
.field__toggle[aria-pressed="true"] .icon-on { display: none; }
.field__toggle[aria-pressed="true"] .icon-off { display: block; }
.field--with-toggle .input { padding-right: 52px; }

.form-error { min-height: 22px; margin: 10px 0 0; color: var(--danger); font-size: 14px; font-weight: 600; }

/* ---------- 알림창 ---------- */
.dialog-backdrop {
  position: fixed; inset: 0; background: rgba(15, 20, 35, .45);
  display: grid; place-items: center; padding: 20px; z-index: 100;
}
.dialog-backdrop[hidden] { display: none; }
.dialog {
  width: min(420px, 100%); background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  padding: 28px 28px 22px; text-align: center;
}
.dialog__title { margin: 0 0 8px; font-size: 20px; }
.dialog__body { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; }
.dialog__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 760px) {
  .site-header__inner { height: 64px; padding: 0 18px; }
  .brand__text { font-size: 19px; }
}
