/* 백와치 회사 소개 사이트. 흰 바탕의 깔끔한 기업형(남색 + 보라 포인트), 모바일 우선 */
:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-muted: #f6f7fb;
  --brand: #4f46e5;
  --brand-dark: #1e1b4b;
  --brand-soft: #eef2ff;
  --danger: #dc2626;
  --ok: #059669;
  --radius: 18px;
  --shadow: 0 12px 32px -18px rgb(15 23 42 / 0.35);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic',
    sans-serif;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- 헤더 ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.logo-text small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: 3px;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ---- 버튼 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgb(79 70 229 / 0.8);
}

.btn-primary:hover {
  background: #4338ca;
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: #c7d2fe;
  color: var(--brand);
}

.btn-danger {
  background: #fff;
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger:hover {
  background: #fef2f2;
}

.btn-small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

/* ---- 첫 화면 ---- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, rgb(129 140 248 / 0.28), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgb(244 114 182 / 0.16), transparent 60%),
    linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  padding: 88px 20px 96px;
}

.eyebrow,
.section-eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--brand);
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.2;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero-lead {
  margin: 20px 0 0;
  max-width: 560px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- 공통 섹션 ---- */
.section {
  padding: 84px 0;
}

.section-muted {
  background: var(--bg-muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 32px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

/* ---- 서비스 카드 ---- */
.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.service-visual {
  position: relative;
  height: 190px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(15 23 42 / 0.05), rgb(15 23 42 / 0.45));
}

.service-icon {
  position: relative;
  z-index: 1;
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgb(0 0 0 / 0.45));
}

.service-icon.round {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 3px solid rgb(255 255 255 / 0.85);
  object-fit: cover;
}

.service-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 26px 26px 28px;
}

.service-tag {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
}

.service h3 {
  margin: 4px 0 10px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.service-lead {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.service-points {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  flex: 1;
}

.service-points li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 15px;
}

.service-points li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.75;
}

.service .btn {
  align-self: flex-start;
}

/* ---- 회사 소개 ---- */
.company {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 40px;
  align-items: start;
}

.company-text p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.company-text h2 {
  margin-bottom: 18px;
}

.info {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.info-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.info-row:last-child {
  border-bottom: 0;
}

.info dt {
  font-weight: 700;
  color: var(--muted);
  font-size: 14px;
}

.info dd {
  margin: 0;
  font-size: 15px;
}

/* ---- 연락처 ---- */
.contacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

a.contact:hover {
  border-color: #c7d2fe;
  box-shadow: var(--shadow);
}

.contact-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
}

.contact-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.contact-value.small {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

/* ---- 하단 ---- */
.site-footer {
  background: var(--brand-dark);
  color: #c7d2fe;
  padding: 44px 0 36px;
  font-size: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 16px;
}

.footer-inner p {
  margin: 16px 0 0;
  line-height: 1.8;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgb(199 210 254 / 0.18);
  color: #a5b4fc;
  font-size: 13px;
}

.footer-bottom a {
  color: #a5b4fc;
}

.footer-bottom a:hover {
  color: #fff;
}

/* ---- 관리자 ---- */
.admin-body {
  background: var(--bg-muted);
  min-height: 100vh;
}

.admin-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px 16px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  display: grid;
  gap: 14px;
}

.card h1 {
  margin: 0 0 4px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 아이폰에서 16px보다 작으면 입력할 때 화면이 확대됨 */
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
}

textarea {
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.18);
}

.alert {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.alert-error {
  background: #fef2f2;
  color: #b91c1c;
}

.alert-ok {
  background: #ecfdf5;
  color: #047857;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgb(255 255 255 / 0.95);
  border-bottom: 1px solid var(--line);
}

.admin-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 16px 48px;
  display: grid;
  gap: 16px;
}

.help {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-form {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.count {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 2px 10px;
}

.tag-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.tag-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.tag-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badge {
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 10px;
}

.badge-google {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-naver {
  background: #dcfce7;
  color: #15803d;
}

.tag-memo {
  font-size: 14px;
  font-weight: 700;
}

.tag-date {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.tag-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--bg-muted);
  border-radius: 10px;
  padding: 10px 12px;
  word-break: break-all;
  color: var(--ink-soft);
}

.tag-item form {
  justify-self: end;
}

.tag-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 0;
}

/* ---- 화면 폭별 ---- */
@media (max-width: 860px) {
  .services,
  .company,
  .contacts {
    grid-template-columns: minmax(0, 1fr);
  }

  .company {
    gap: 24px;
  }
}

@media (max-width: 560px) {
  .nav a {
    padding: 8px 9px;
    font-size: 14px;
  }

  .logo-text {
    font-size: 17px;
  }

  .hero-inner {
    padding: 60px 20px 68px;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .section {
    padding: 60px 0;
  }

  .service-visual {
    height: 160px;
  }

  .service-body {
    padding: 22px 20px 24px;
  }

  .service .btn {
    align-self: stretch;
  }

  .info-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 14px 18px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .nav {
    display: none;
  }
}
