/* AI 법률 조언 서비스(헬로Law) 사례 전용 스타일.
   색은 styles.css 의 의미 토큰(--surface, --line, --ink …)만 참조한다.
   토큰이 다크 테마 값을 이미 들고 있으므로 여기서 색을 새로 정의하지 않는다. */

.hellolaw-page {
  --hellolaw-blue: #6ea8ff;
  --hellolaw-green: var(--teal-400);
}

.hellolaw-page .section-heading > p:not(.eyebrow) {
  font-size: 16px;
  line-height: 1.7;
}

/* ── 히어로 ──────────────────────────────────────────────────────────── */

.hellolaw-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(400px, 0.8fr);
  gap: clamp(40px, 4vw, 64px);
  align-items: start;
}

/* 헤드라인 오른쪽에 서비스 로고를 나란히 둔다. */
.hellolaw-hero-head {
  display: flex;
  gap: clamp(20px, 2.4vw, 34px);
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.hellolaw-hero-head .hellolaw-title {
  margin-bottom: 0;
}

/* 헤드라인이 쓸 폭을 최대한 남기도록 로고는 좁은 세로 배치로 둔다. */
.hellolaw-brand {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
  justify-items: center;
  max-width: 172px;
  text-align: center;
}

.hellolaw-brand img {
  width: auto;
  height: 96px;
  object-fit: contain;
}

.hellolaw-brand strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.03em;
}

.hellolaw-brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  word-break: keep-all;
}

.hellolaw-title {
  max-width: 720px;
  font-size: clamp(38px, 3.05vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.hellolaw-title > span,
.hellolaw-title > em {
  display: block;
}

.hellolaw-title em {
  color: var(--accent);
  font-style: normal;
}

.hellolaw-hero .hero-lead {
  max-width: 650px;
  margin-bottom: 0;
  font-size: clamp(17px, 1.35vw, 20px);
}

/* 팀 구성 중 내가 맡은 자리를 강조한다. */
.hellolaw-me {
  color: var(--accent-strong);
  font-style: normal;
  font-weight: 820;
  white-space: nowrap;
}

.hellolaw-me span {
  margin-left: 7px;
  border: 1px solid rgba(154, 139, 240, 0.5);
  border-radius: 999px;
  background: rgba(154, 139, 240, 0.14);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}

/* 프로젝트 정보의 부가 설명: 본문보다 한 단계 약하게 둔다. */
.hellolaw-page .project-facts-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ── 서비스 화면 ─────────────────────────────────────────────────────── */

.hellolaw-service-figure {
  margin: 34px 0 0;
}

.hellolaw-service-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.hellolaw-service-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ── 아키텍쳐 ────────────────────────────────────────────────────────── */

/* 구성도는 각 노드에 실제 기술 로고를 붙여 한눈에 구분되게 한다. */
.hellolaw-architecture {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: clamp(20px, 2.4vw, 30px);
  box-shadow: var(--shadow);
}

.hlarch {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hlarch-eks {
  position: relative;
  flex: 1 1 auto;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 30px clamp(14px, 1.6vw, 22px) 18px;
}

.hlarch-eks-label {
  position: absolute;
  top: 10px;
  left: 16px;
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hlarch-flow {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hlarch-col {
  display: grid;
  flex: 1 1 0;
  gap: 10px;
}

/* 게이트웨이에서 세 서비스로 갈라지는 분기: 세로 버스에서 화살표 세 개가 뻗는다. */
.hlarch-branch {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  flex: 1.15 1 0;
  gap: 0;
  align-items: center;
}

.hlarch-branch > .hlarch-node {
  margin: 5px 0;
}

/* 화살표 칸은 행 높이만큼 늘려, 세로 버스를 칸 단위로 이어 그린다.
   가로선은 배경 그라데이션으로 칸 가운데에 둔다. */
.hlarch-branch > .hlarch-link {
  width: 30px;
  height: auto;
  align-self: stretch;
  background: linear-gradient(var(--line), var(--line)) no-repeat left center / 100% 1px;
}

.hlarch-branch > .hlarch-link::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--line);
  content: "";
}

/* 첫 칸은 가운데부터 아래로, 마지막 칸은 위에서 가운데까지만 그려
   버스가 바깥으로 삐져나오지 않게 한다. */
.hlarch-branch > .hlarch-link:first-of-type::before {
  top: 50%;
}

.hlarch-branch > .hlarch-link:last-of-type::before {
  bottom: 50%;
}

/* 가운데 화살표는 왼쪽으로 10px 더 늘려, 게이트웨이에서 오는 선과
   한 줄로 이어지게 한다(세로 버스 위치는 그대로 유지). */
.hlarch-branch > .hlarch-link:nth-of-type(2) {
  width: 40px;
  margin-left: -10px;
  padding-left: 10px;
}

.hlarch-branch > .hlarch-link:nth-of-type(2)::before {
  left: 10px;
}

.hlarch-node {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 12px 14px;
}

/* 브랜드 로고는 어두운 배경에서 색이 묻히므로 밝은 칩 위에 올린다. */
.hlarch-node img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 5px;
  object-fit: contain;
}

.hlarch-node strong {
  display: block;
  color: var(--ink);
  font-size: 14.5px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.hlarch-node span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
  word-break: keep-all;
}

.hlarch-node--client {
  flex: 0 0 auto;
  border-style: dashed;
  background: none;
  padding: 12px 16px;
}

.hlarch-node--gate {
  border-color: rgba(154, 139, 240, 0.46);
  background: rgba(154, 139, 240, 0.12);
}

.hlarch-node--main {
  border-color: rgba(110, 168, 255, 0.44);
  background: rgba(110, 168, 255, 0.1);
}

.hlarch-node--store {
  border-color: rgba(95, 220, 196, 0.36);
  background: rgba(95, 220, 196, 0.08);
}

/* 열 사이를 잇는 화살표. 좁은 화면에서는 세로로 세운다. */
.hlarch-link {
  position: relative;
  display: block;
  width: 22px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--line);
}

.hlarch-link::after {
  position: absolute;
  top: 50%;
  right: 0;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  content: "";
  transform: translate(1px, -50%) rotate(45deg);
}

.hellolaw-reason-list {
  margin-top: 28px;
}

.hellolaw-reason-list h3 {
  margin: 0 0 16px;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.hellolaw-reason-list dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.hellolaw-reason-list dl > div {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
  padding: 20px 22px;
}

.hellolaw-reason-list dt {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.hellolaw-reason-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.72;
  word-break: keep-all;
}

/* ── 배포 파이프라인 ─────────────────────────────────────────────────── */

/* 배포 흐름도는 Graphviz(dot) 로 레이아웃을 계산해 만든 SVG 를 그대로 얹는다.
   원본 정의는 ../assets/hello-law-deploy-flow.dot 에 있다. */
.hellolaw-pipeline {
  display: grid;
  justify-items: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: clamp(24px, 2.6vw, 34px);
  box-shadow: var(--shadow);
}

.hellolaw-pipeline img {
  width: 100%;
  max-width: 560px;
  height: auto;
}

/* kubectl 명령은 실제로 실행한 형태를 그대로 보여준다. */
.hellolaw-command {
  overflow-x: auto;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px 16px;
}

.hellolaw-command code {
  background: none;
  padding: 0;
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre;
}

/* ── 배포 상세 카드 ─────────────────────────────────────────────────── */

.hellolaw-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.hellolaw-detail-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 24px;
}

.hellolaw-detail-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.hellolaw-detail-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
  word-break: keep-all;
}

.hellolaw-check-list {
  margin: 14px 0 0;
  padding-left: 0;
  list-style: none;
}

.hellolaw-check-list li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
}

.hellolaw-check-list li + li {
  margin-top: 7px;
}

.hellolaw-check-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--teal-400);
  content: "✓";
  font-size: 13px;
  font-weight: 800;
}

/* ── 셀렉터 전환 도식 ───────────────────────────────────────────────── */

.hellolaw-switch {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 18px;
}

.hellolaw-switch-service {
  border: 1px solid rgba(154, 139, 240, 0.46);
  border-radius: 12px;
  background: rgba(154, 139, 240, 0.12);
  padding: 13px 16px;
  text-align: center;
}

.hellolaw-switch-service > span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hellolaw-switch-service > strong {
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
}

.hellolaw-switch-service em {
  color: var(--hellolaw-green);
  font-style: normal;
  font-weight: 800;
}

.hellolaw-switch-targets {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.hellolaw-switch-targets::before {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 1px;
  height: 14px;
  background: var(--line);
  content: "";
}

.hellolaw-switch-target {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px 16px;
}

.hellolaw-switch-target > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hellolaw-switch-target > strong {
  display: block;
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13.5px;
}

.hellolaw-switch-target > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  word-break: keep-all;
}

.hellolaw-switch-target.is-idle {
  border-color: rgba(110, 168, 255, 0.34);
  opacity: 0.72;
}

.hellolaw-switch-target.is-live {
  border-color: rgba(95, 220, 196, 0.5);
  background: rgba(95, 220, 196, 0.09);
}

.hellolaw-switch-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ── 결과 ────────────────────────────────────────────────────────────── */

.hellolaw-result-matrix {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hellolaw-matrix-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.hellolaw-matrix-row:first-child {
  border-top: 0;
}

.hellolaw-matrix-row > * {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 18px 22px;
  font-size: 14.5px;
  line-height: 1.6;
  word-break: keep-all;
}

.hellolaw-matrix-row > * + * {
  border-left: 1px solid var(--line);
}

.hellolaw-matrix-row.heading {
  background: var(--surface-soft);
}

.hellolaw-matrix-row.heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hellolaw-matrix-row strong {
  color: var(--accent-strong);
  font-size: 15px;
}

.hellolaw-matrix-row:not(.heading) > span:nth-child(2) {
  color: var(--muted);
  background: rgba(239, 161, 127, 0.06);
}

.hellolaw-matrix-row:not(.heading) > span:last-child {
  background: rgba(154, 139, 240, 0.07);
  font-weight: 700;
}

.hellolaw-matrix-row em {
  color: var(--accent-strong);
  font-size: 18px;
  font-style: normal;
  font-weight: 850;
}

/* ── 반응형 ──────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hellolaw-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 좁은 화면에서는 구성도를 위에서 아래로 흐르게 세운다. */
  .hlarch,
  .hlarch-flow {
    flex-direction: column;
    align-items: stretch;
  }

  .hlarch-node--client {
    justify-content: center;
  }

  /* 분기도 한 줄로 세운다: 세로 버스 대신 화살표만 남긴다. */
  .hlarch-branch {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .hlarch-branch > .hlarch-node {
    margin: 0;
  }

  .hlarch-branch > .hlarch-link,
  .hlarch-branch > .hlarch-link:nth-of-type(2) {
    width: 1px;
    height: 20px;
    align-self: center;
    margin: 0 auto;
    padding-left: 0;
    background: var(--line);
  }

  .hlarch-branch > .hlarch-link::before {
    display: none;
  }

  .hlarch-link {
    width: 1px;
    height: 20px;
    margin: 0 auto;
  }

  .hlarch-link::after {
    top: auto;
    right: auto;
    bottom: 0;
    left: 50%;
    border-top: 0;
    border-right: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    transform: translate(-50%, 1px) rotate(45deg);
  }

  .hellolaw-reason-list dl,
  .hellolaw-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  /* 좁은 화면에서는 로고를 헤드라인 아래로 내린다. */
  .hellolaw-hero-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .hellolaw-brand img {
    height: 62px;
  }

  .hellolaw-switch-targets {
    grid-template-columns: minmax(0, 1fr);
  }

  .hellolaw-result-matrix {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .hellolaw-matrix-row {
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
  }

  .hellolaw-matrix-row.heading {
    display: none;
  }

  .hellolaw-matrix-row > * {
    padding: 15px 18px;
  }

  .hellolaw-matrix-row > * + * {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hellolaw-matrix-row strong::before,
  .hellolaw-matrix-row > span::before {
    display: inline-block;
    flex: 0 0 44px;
    margin-right: 10px;
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 820;
    letter-spacing: 0.06em;
  }

  .hellolaw-matrix-row strong::before {
    content: "항목";
  }

  .hellolaw-matrix-row > span:nth-child(2)::before {
    content: "기존";
  }

  .hellolaw-matrix-row > span:last-child::before {
    content: "개선";
  }
}
