/* ===== 1. 기본 설정: 색상과 글꼴은 여기에서 바꿀 수 있습니다. ===== */
:root {
  --blue-900: #111f4d;
  --blue-700: #263e9a;
  --blue-600: #3853c7;
  --blue-100: #eaf0ff;
  --blue-050: #f5f8ff;
  --ink: #182033;
  --gray-700: #485267;
  --gray-500: #6f788a;
  --gray-300: #d6dce7;
  --white: #ffffff;
  --warning: #8b5700;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(24, 43, 102, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--white); border: 2px solid var(--blue-700); }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #f1a900; outline-offset: 3px; }

/* ===== 2. 공통 헤더와 메뉴 ===== */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(214,220,231,.8); backdrop-filter: blur(12px); }
.header-inner { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 15px; color: var(--blue-900); font-size: 1.575rem; font-weight: 900; text-decoration: none; }
.brand img { width: 72px; height: 72px; object-fit: contain; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: #39445b; font-weight: 700; text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--blue-600); }
.main-nav .nav-contact { padding: 9px 17px; color: var(--white); background: var(--blue-700); border-radius: 8px; }
.main-nav .nav-contact:hover, .main-nav .nav-contact[aria-current="page"] { color: var(--white); background: var(--blue-900); }
.menu-button { display: none; padding: 7px 12px; border: 1px solid var(--gray-300); border-radius: 8px; background: var(--white); color: var(--blue-900); font-size: 1.35rem; cursor: pointer; }

/* ===== 3. 공통 제목, 버튼, 섹션 ===== */
.section { padding: 92px 0; }
.section-soft { background: var(--blue-050); }
.eyebrow { margin: 0 0 13px; color: var(--blue-600); font-size: .78rem; font-weight: 900; letter-spacing: .15em; }
.eyebrow.light { color: #acbbf3; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--blue-900); line-height: 1.35; letter-spacing: -.025em; }
h2 { font-size: clamp(1.85rem, 3.3vw, 2.75rem); }
p { color: var(--gray-700); }
.button-group { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 20px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 24px; border: 2px solid var(--blue-700); border-radius: 9px; background: var(--blue-700); color: var(--white); font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--blue-900); border-color: var(--blue-900); }
.button-outline { color: var(--blue-700); background: transparent; }
.button-white { color: var(--blue-900); background: var(--white); border-color: var(--white); }
.fine-print { font-size: .9rem; color: var(--gray-500); }
.text-link { display: inline-block; margin-top: 32px; color: var(--blue-700); font-weight: 800; text-underline-offset: 5px; }

/* ===== 4. 홈 화면 ===== */
.hero { padding: 100px 0 92px; background: radial-gradient(circle at 82% 16%, #dbe4ff 0, transparent 30%), linear-gradient(145deg, #fbfcff 30%, #eef3ff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.8fr 1fr; gap: 40px; align-items: center; }
.hero h1 { margin: 0; font-size: clamp(2.6rem, 3.9vw, 3.3rem); line-height: 1.2; letter-spacing: -.035em; }
.hero h1 span { display: block; white-space: nowrap; }
.hero h1 em { color: var(--blue-600); font-style: normal; }
.hero-copy { max-width: 700px; margin: 25px 0 0; font-size: 1.1rem; }
.hero-card { padding: 32px; background: var(--white); border: 1px solid #e4e9f4; border-radius: var(--radius); box-shadow: var(--shadow); }
.erm-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--gray-300); }
.erm-heading h2 { margin: 0; color: var(--blue-900); font-size: 1.35rem; }
.erm-heading span { color: var(--gray-500); font-size: .68rem; letter-spacing: .12em; white-space: nowrap; }
.erm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.erm-grid article { padding: 20px 18px; border: 1px solid var(--gray-300); border-radius: 12px; }
.erm-grid span { color: var(--blue-600); font-size: .78rem; }
.erm-grid h3 { margin: 12px 0 5px; font-size: 1.02rem; }
.erm-grid p { margin: 0; color: var(--gray-500); font-size: .8rem; }
.section-heading { display: flex; justify-content: space-between; gap: 60px; align-items: end; margin-bottom: 42px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.section-heading p { max-width: 470px; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card { min-height: 260px; padding: 28px; border: 1px solid var(--gray-300); border-radius: var(--radius); background: var(--white); transition: transform .2s ease, box-shadow .2s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card > span { color: var(--blue-600); font-size: .85rem; font-weight: 900; }
.service-card h3 { margin: 48px 0 10px; font-size: 1.3rem; }
.service-card p { margin-bottom: 0; font-size: .95rem; }
.section-blue { color: var(--white); background: var(--blue-900); }
.section-blue h2 { max-width: 750px; color: var(--white); }
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 0; margin: 45px 0 0; list-style: none; background: rgba(255,255,255,.15); }
.process li { min-height: 240px; padding: 30px; background: var(--blue-900); }
.process strong { color: #9eafea; }
.process h3 { margin: 55px 0 10px; color: var(--white); font-size: 1.25rem; }
.process p { color: #cbd3ed; font-size: .94rem; }
.faq-layout { display: grid; grid-template-columns: .65fr 1.35fr; gap: 80px; }
.accordion details { border-top: 1px solid var(--gray-300); }
.accordion details:last-child { border-bottom: 1px solid var(--gray-300); }
.accordion summary { padding: 22px 4px; color: var(--blue-900); font-size: 1.05rem; font-weight: 800; cursor: pointer; }
.accordion details p { padding: 0 4px 22px; margin: 0; }
.contact-banner { background: linear-gradient(120deg, #314ab1, #18275f); }
.banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.banner-inner h2, .banner-inner p { color: var(--white); }
.banner-inner p { margin-bottom: 0; }

/* ===== 5. 하위 페이지 ===== */
.sub-hero { padding: 78px 0; background: linear-gradient(145deg, #fbfcff, #edf2ff); }
.sub-hero h1 { margin: 0; font-size: clamp(2.4rem, 5vw, 4rem); }
.sub-hero p:last-child { max-width: 730px; margin-top: 18px; margin-bottom: 0; font-size: 1.05rem; }
.service-list > article { display: grid; grid-template-columns: 90px 1fr; gap: 36px; padding: 48px 0; border-bottom: 1px solid var(--gray-300); }
.service-list > article:first-child { padding-top: 0; }
.service-list > article > span { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 17px; background: var(--blue-100); color: var(--blue-700); font-weight: 900; }
.service-list h2 { font-size: 1.75rem; }
.service-list ul { padding-left: 1.2em; color: var(--gray-700); }
.service-list li { margin: 6px 0; }
.case-list { display: grid; gap: 24px; }
.case-card { display: grid; grid-template-columns: 230px 1fr; overflow: hidden; border: 1px solid var(--gray-300); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.case-number { display: flex; flex-direction: column; justify-content: space-between; min-height: 390px; padding: 34px; color: var(--white); background: linear-gradient(150deg, var(--blue-700), var(--blue-900)); }
.case-number span { font-weight: 800; }
.case-number strong { color: #bfcaf2; font-size: .85rem; letter-spacing: .12em; }
.case-body { padding: 38px 42px; }
.case-body h2 { font-size: 1.8rem; }
.case-status { display: inline-block; padding: 8px 12px; color: var(--blue-700); background: var(--blue-100); border-radius: 7px; font-weight: 800; }
.case-body dl { margin: 28px 0 0; }
.case-body dl div { display: grid; grid-template-columns: 100px 1fr; gap: 20px; padding: 15px 0; border-top: 1px solid var(--gray-300); }
.case-body dt { color: var(--blue-900); font-weight: 900; }
.case-body dd { margin: 0; color: var(--gray-700); }
.about-layout { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 75px; }
.portrait-frame { overflow: hidden; height: 600px; border-radius: var(--radius); background: var(--blue-100); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.about-layout h2 small { color: var(--blue-600); font-size: .65em; }
.profile-link { color: var(--blue-900); font-weight: 900; text-underline-offset: 5px; }
.profile-list { margin: 32px 0; }
.profile-list div { display: grid; grid-template-columns: 125px 1fr; padding: 13px 0; border-top: 1px solid var(--gray-300); }
.profile-list dt { color: var(--blue-900); font-weight: 800; }
.profile-list dd { margin: 0; color: var(--gray-700); }
.value-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 70px; }
.value-cards { display: grid; gap: 15px; }
.value-cards article { padding: 24px 28px; background: var(--white); border-radius: 12px; }
.value-cards h3, .value-cards p { margin-bottom: 5px; }
.contact-layout { display: grid; grid-template-columns: .7fr 1.3fr; gap: 75px; }
.contact-info { display: grid; margin-top: 34px; font-style: normal; }
.contact-info a { display: grid; padding: 18px 0; border-bottom: 1px solid var(--gray-300); text-decoration: none; }
.contact-info span { color: var(--gray-500); font-size: .85rem; }
.contact-info strong { color: var(--blue-900); }
.contact-form { padding: 38px; border: 1px solid var(--gray-300); border-radius: var(--radius); box-shadow: var(--shadow); }
.required-guide { margin: 0 0 20px; color: var(--gray-500); font-size: .88rem; }
.required-guide span { color: #b32318; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; color: var(--blue-900); font-weight: 800; }
.field label span { color: #b32318; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 13px; border: 1px solid #9aa5b7; border-radius: 7px; background: var(--white); }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: #b32318; }
.field small, .checkbox-error { display: block; min-height: 1.4em; color: #a11d14; font-size: .83rem; }
.agreement { display: flex; align-items: flex-start; gap: 10px; margin-top: 5px; }
.agreement input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 5px; }
.submit-button { width: 100%; margin-top: 14px; }
.submit-button:disabled { cursor: wait; opacity: .65; }
.form-guide { margin: 12px 0 0; color: var(--gray-500); font-size: .85rem; }
.form-status { display: none; padding: 12px 14px; margin-top: 14px; background: #fff7e7; color: var(--warning); border-radius: 7px; }
.form-status.show { display: block; }
.form-status.success { color: #155c38; background: #e7f7ee; }
.form-status.error { color: #8b1f18; background: #fff0ee; }
.form-status.pending { color: #334b8f; background: var(--blue-100); }
.policy { max-width: 860px; }
.policy h2 { margin-top: 42px; font-size: 1.4rem; }

/* ===== 6. 푸터 ===== */
.site-footer { padding: 52px 0 24px; color: #c9d0e6; background: #0d1739; }
.footer-grid { display: flex; justify-content: space-between; gap: 45px; }
.footer-grid > div { max-width: 760px; }
.footer-grid img { filter: brightness(0) invert(1); opacity: .85; }
.footer-brand { margin: 8px 0; color: var(--white); font-size: 1.2rem; font-weight: 900; }
.site-footer p { margin: 5px 0; color: #c9d0e6; font-size: .9rem; }
.site-footer nav { display: flex; align-items: flex-start; gap: 18px; }
.site-footer a { text-underline-offset: 4px; }
.copyright { display: flex; justify-content: space-between; gap: 20px; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: .82rem; }

/* ===== 7. 태블릿과 모바일 ===== */
@media (max-width: 900px) {
  .menu-button { display: block; }
  .main-nav { display: none; position: absolute; top: 70px; right: 20px; left: 20px; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; background: var(--white); border: 1px solid var(--gray-300); border-radius: 12px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px 12px; }
  .main-nav .nav-contact { margin-top: 6px; text-align: center; }
  .hero-grid, .about-layout, .contact-layout { grid-template-columns: 1fr; gap: 45px; }
  .case-card { grid-template-columns: 180px 1fr; }
  .service-grid, .process { grid-template-columns: 1fr 1fr; }
  .section-heading, .banner-inner { align-items: flex-start; flex-direction: column; }
  .faq-layout, .value-grid { grid-template-columns: 1fr; gap: 35px; }
  .portrait-frame { max-width: 600px; height: 620px; }
}

@media (max-width: 580px) {
  .container { width: calc(100% - 28px); }
  .header-inner { min-height: 82px; }
  .brand { gap: 12px; font-size: 1.35rem; }
  .brand img { width: 64px; height: 64px; }
  .section { padding: 62px 0; }
  .hero { padding: 66px 0; }
  .hero h1 { font-size: 1.55rem; line-height: 1.35; letter-spacing: -.045em; }
  .erm-heading { align-items: flex-start; flex-direction: column; }
  .erm-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 25px; }
  .contact-form { padding: 25px; }
  .service-grid, .process, .form-grid { grid-template-columns: 1fr; }
  .service-card { min-height: auto; }
  .service-card h3 { margin-top: 25px; }
  .process li { min-height: auto; }
  .process h3 { margin-top: 25px; }
  .button-group .button { width: 100%; }
  .sub-hero { padding: 55px 0; }
  .service-list > article { grid-template-columns: 1fr; gap: 20px; }
  .case-card { grid-template-columns: 1fr; }
  .case-number { min-height: auto; gap: 35px; }
  .case-body { padding: 28px 24px; }
  .case-body dl div { grid-template-columns: 1fr; gap: 4px; }
  .portrait-frame { height: 470px; }
  .profile-list div { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid, .copyright { flex-direction: column; }
  .site-footer nav { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
