:root {
  color-scheme: light;
  font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color: #212121;
  background: #f7f9fb;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: #0f2040;
  color: #fff;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* 모바일 우선: 로고 + (AI진단·메뉴버튼)이 한 줄, 전체 메뉴는 접혔다 펼쳐지는 형태 */
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.brand {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.brand strong {
  font-size: 1.05rem;
  color: #fff;
  white-space: nowrap;
}

.brand span {
  color: #9bb0d5;
  font-size: 0.68rem;
  white-space: nowrap;
}

.header-actions {
  order: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.12);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.main-nav {
  order: 3;
  flex-basis: 100%;
  display: none;
  flex-direction: column;
  gap: 4px;
  background: rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 8px;
}

.main-nav.open {
  display: flex;
}

.main-nav a {
  color: #cbd7f4;
  text-decoration: none;
  font-size: 1rem;
  padding: 10px 12px;
  border-radius: 8px;
}

/* 데스크톱(넓은 화면)에서만: 로고 좌측, 메뉴 한 줄, AI진단 버튼 우측 */
@media (min-width: 761px) {
  .brand strong {
    font-size: 1.25rem;
  }
  .brand span {
    font-size: 0.95rem;
  }
  .header-actions {
    order: 3;
  }
  .nav-toggle {
    display: none;
  }
  .main-nav {
    order: 2;
    flex-basis: auto;
    display: flex !important;
    flex-direction: row;
    gap: 20px;
    background: none;
    padding: 0;
  }
  .main-nav a {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0;
  }
}

.nav-ai-badge {
  background: #5dd8d5;
  color: #06213c;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.section {
  padding: 60px 0;
}

.hero {
  background-color: #08122c;
  background-image: linear-gradient(180deg, rgba(8,18,44,0.82) 0%, rgba(24,46,91,0.35) 50%, rgba(8,18,44,0.85) 100%),
    url('https://source.unsplash.com/featured/1600x900/?jeju,canola,sea');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  padding: 80px 0; /* 상하 여유를 늘려 시각적 균형 개선 */
  display: flex; /* 수직/수평 중앙 정렬을 위한 flex 레이아웃 */
  align-items: center;
  justify-content: center;
}

.hero-grid {
  display: flex;
  flex-direction: row;
  justify-content: center; /* 가로 중앙 정렬 */
  align-items: center;
  gap: 40px;
  width: 100%;
}

.eyebrow {
  font-weight: 700;
  color: #66d4c7;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.05;
  color: #ffffff;
}
.hero-title {
  display: inline-flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}
.hero-title .title-part {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(80px);
}
.hero-title.show .title-part-1 {
  animation: heroTitleFade 1.25s ease-out 0.2s forwards;
}
.hero-title.show .title-part-2 {
  animation: heroTitleFade 1.25s ease-out 1.7s forwards;
}
.hero-title.show .title-part-3 {
  animation: heroTitleFade 1.25s ease-out 3.2s forwards;
}
@keyframes heroTitleFade {
  0% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(80px);
  }
  1% {
    visibility: visible;
  }
  100% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}


.hero-copy {
  max-width: 720px; /* 텍스트 컬럼 너비 제한으로 가독성 향상 */
  padding: 12px 24px;
  margin: 0 auto; /* 가운데 정렬 유지 */
  text-align: center; /* 텍스트 가운데 정렬 */
}

.hero-copy p {
  margin-top: 24px;
  max-width: 600px;
  color: #dfe9ff;
}

/* 히어로 강조 문구 */
.hero-highlight {
  font-size: 1.5em; /* 150% 강조 */
  color: #9ff3e8; /* 파랑 배경에 어울리는 밝은 청록 계열 */
  font-weight: 800;
  margin-top: 18px;
  text-shadow: 0 6px 18px rgba(6,33,60,0.45);
}

@media (max-width: 480px) {
  .hero-highlight { font-size: 1.25em; }
}

/* 단어(문자) 결합 유지 유틸 */
.keep-together {
  white-space: nowrap; /* 줄바꿈 불가 */
  display: inline-block;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
  justify-content: center; /* CTA 버튼 중앙 정렬 */
}

/* CTA 버튼 그룹을 왼쪽 정렬 유지하되 가독성 보강 */
.hero-actions .btn-primary { box-shadow: 0 18px 40px rgba(93,216,213,0.14); }

.btn {
  border: none;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  padding: 14px 24px;
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  transform: translateY(-1px);
}

.hero-actions .btn-primary {
  padding: 18px 32px;
  font-size: 1.1rem;
  min-width: 220px;
  box-shadow: 0 14px 30px rgba(93, 216, 213, 0.25);
}

.btn-primary {
  background: #5dd8d5;
  color: #06213c;
}

.btn-secondary {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.note {
  margin-top: 16px;
  color: #a3b1d7;
}

.hero-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 32px;
}

.hero-card-inner h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.hero-card-inner ul {
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.hero-card-inner li {
  margin-bottom: 14px;
  font-size: 1rem;
}

.highlight-grid,
.service-grid,
.why-grid,
.metrics-grid,
.process-grid,
.pricing-grid,
.lawyer-grid,
.contact-grid {
  display: grid;
  gap: 24px;
}

.quick-highlights .highlight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.highlight-card,
.service-card,
.mini-card,
.metric-card,
.process-step,
.pricing-card,
.lawyer-card,
.contact-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(15, 32, 64, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover,
.service-card:focus-within,
.service-card:focus {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 80px rgba(15, 32, 64, 0.16);
}

.highlight-card h3,
.service-card h3,
.mini-card h3,
.metric-card h3,
.process-step h4,
.pricing-card h3,
.lawyer-card h3,
.contact-card h3 {
  margin-top: 0;
}

.highlight-card p,
.service-card p,
.mini-card p,
.metric-card p,
.process-step p,
.pricing-card ul,
.lawyer-card ul,
.contact-card p {
  margin-top: 12px;
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 왜 소확행 캐러셀 */
.why-carousel {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
}
.why-carousel .carousel-track {
  display: flex;
  transition: transform 0.6s ease;
}
.why-carousel .carousel-slide {
  flex: 0 0 36%;
  margin-right: 16px;
  padding: 18px;
  min-height: 220px;
}
.why-carousel { padding-bottom: 8px; }

/* carousel controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.95);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(15,32,64,0.18);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-btn:focus { outline: 3px solid rgba(93,216,213,0.22); }

.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}
.carousel-dots .dot {
  width: 10px;
  height: 10px;
  background: #d7e0ea;
  border-radius: 50%;
  cursor: pointer;
}
.carousel-dots .dot.active { background: #5dd8d5; }
.why-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15,32,64,0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.why-card h3 {
  font-size: clamp(1.4rem, 2.24vw, 1.68rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 14px 0 8px;
  color: #06213c;
}
.why-card p {
  font-size: clamp(0.98rem, 1.75vw, 1.19rem);
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  color: #06213c;
}
.why-card .big {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 8px 0;
}

/* 큰 수치(누적 상담건수 / 누적 청구액) 스타일 */
.why-card .metric-number {
  font-size: 1.8rem;
  font-weight: 900;
  color: #06213c;
  display: inline-block;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* 흐름도(서비스 절차) 스타일 */
.flowchart-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.flowchart-svg { background: transparent; }
.flowchart-note { font-size: 0.95rem; color: #233249; }
.flowchart-container svg rect { filter: drop-shadow(0 8px 20px rgba(15,32,64,0.06)); }

@media (max-width: 720px) {
  .flowchart-container svg { max-width: 100%; }
  .flowchart-container foreignObject div { font-size: 20px !important; }
}

.service-card {
  cursor: pointer;
}
.service-card h3 {
  font-size: 1.2em; /* 제목을 120%로 확대 */
  font-weight: 700;
  color: #06213c;
  margin-bottom: 8px;
}

.service-card .easy-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: normal;
  word-break: keep-all;
}

.service-card:focus { outline: 2px solid #5dd8d5; }
.card-detail h4 { margin-top: 0; }

/* info modal body spacing */
#infoBody { margin-top: 12px; }

.service-card ul,
.lawyer-card ul {
  list-style: none;
  padding: 0;
}

.service-card li,
.lawyer-card li {
  margin-top: 10px;
}

.why-grid {
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}

.why-copy ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.why-copy li {
  margin-bottom: 14px;
}

.why-cards {
  display: grid;
  gap: 20px;
}

.metrics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  gap: 24px;
}

.hero-metrics .metric-card,
.metrics .metric-card {
  max-width: 280px;
  width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 24px 22px;
  box-shadow: 0 18px 40px rgba(15, 32, 64, 0.1);
  text-align: center;
}

.metric-card h3 {
  margin: 0;
  font-size: 2.5rem;
  color: #0f2040;
}

.process-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.process-step {
  text-align: center;
}

.process-step span {
  display: inline-flex;
  width: 52px;
  height: 52px;
  background: #5dd8d5;
  color: #06213c;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  margin-bottom: 18px;
  font-weight: 700;
}

.pricing-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pricing-card .price {
  margin: 16px 0;
  font-size: 1.28rem;
  color: #0f2040;
}

.pricing-table {
  margin-top: 32px;
  overflow-x: auto;
  background: #fff; /* 차이가 잘 보이도록 배경 추가 */
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(15,32,64,0.06);
  cursor: pointer;
}

.pricing-table table {
  width: 100%;
  border-collapse: collapse;
}

.pricing-table h3 {
  margin: 0 0 8px 0;
  color: #06213c;
}

.pricing-table .note {
  margin: 8px 0 12px 0;
  color: #233344;
}

.pricing-table .btn-secondary {
  background: #eef7ff;
  color: #06213c;
  border: 1px solid rgba(6,33,60,0.06);
}

.pricing-table th,
.pricing-table td {
  padding: 14px 18px;
  border: 1px solid #ddd;
}

.pricing-table th {
  text-align: left;
  background: #f2f7ff;
}

.lawyer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}

.contact-card {
  background: #0f2040;
  color: #fff;
}

.site-footer {
  background: #08122c;
  color: #c1c7db;
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 30;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 48, 0.68);
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 32px;
  max-width: 760px;
  width: 100%;
  padding: 32px;
  z-index: 1;
  box-shadow: 0 40px 80px rgba(15, 32, 64, 0.18);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
}

.modal-body label {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
}

.modal-body input,
.modal-body textarea {
  width: 100%;
  border: 1px solid #d7dbe8;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 1rem;
  margin-bottom: 20px;
}

.radio-group {
  display: grid;
  gap: 12px;
}

.survey-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.survey-page {
  display: none;
}

.survey-page.active {
  display: block;
}

.survey-stepper {
  margin-top: 10px;
  color: #59739b;
}

@media (max-width: 920px) {
  .hero-grid,
  .why-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .service-grid,
  .pricing-grid,
  .lawyer-grid,
  .metrics-grid,
  .process-grid,
  .highlight-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy h1 {
    font-size: clamp(2rem, 6vw, 2.8rem);
  }
  .hero-copy p,
  .section-header p,
  .highlight-card p,
  .service-card p,
  .metric-card p,
  .pricing-card p,
  .contact-card p {
    margin-top: 12px;
    line-height: 1.65;
  }
  .hero-card,
  .highlight-card,
  .service-card,
  .metric-card,
  .pricing-card,
  .lawyer-card,
  .contact-card,
  .modal-content {
    padding: 22px;
  }
  .metric-card {
    max-width: none;
    width: 100%;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 920px) {
  .why-carousel .carousel-slide { flex: 0 0 70%; }
}

@media (max-width: 620px) {
  .why-carousel .carousel-slide { flex: 0 0 90%; }
}

@media (max-width: 620px) {
  .section {
    padding: 40px 0;
  }
  .hero {
    padding-top: 36px;
    padding-bottom: 36px;
  }
  .hero-copy h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }
  .hero-copy p {
    font-size: 0.98rem;
  }
  .btn {
    width: 100%;
  }
  .hero-card,
  .highlight-card,
  .service-card,
  .metric-card,
  .pricing-card,
  .lawyer-card,
  .contact-card {
    width: 100%;
  }
  .metrics-grid,
  .highlight-grid,
  .service-grid,
  .process-grid,
  .pricing-grid,
  .lawyer-grid,
  .contact-grid {
    gap: 18px;
  }
  .footer-inner {
    flex-direction: column;
    gap: 16px;
  }
  .survey-actions {
    flex-direction: column;
  }
}
