/* 브랜드 가이드 — components.css 의 .bg__* 위에 덮어씀.
   섹션 사이 간격은 --section-py 하나(IR·오시는 길과 같은 리듬), 제목 아래는 --brand-head-gap.
   모든 격자는 같은 열 간격 --brand-gap(32) — 두 칸·네 칸 격자의 열 시작선이 섹션끼리 맞는다.
   견본 판(.brand-board)은 흰 바탕 + 얇은 선 + 점 격자. 글이 아니라 견본 크기·측정선으로 리듬을 만든다. */
.brand-sec {
  --brand-head-gap: clamp(var(--sp-5), 2.4vw, var(--sp-6));
  --brand-gap: var(--sp-6);
  --brand-box-pad: var(--sp-6);
  --brand-copy-py: 2px;
  --brand-chip-sm: 72px;
  --brand-row: 52px;
  /* 사용 규칙 띠 — 인재채용 사내복지 띠와 같은 옅은 회색(2026-11-03 지정). 병합 때 공용 토큰으로 바뀜. */
  --brand-band: var(--bg-band-gray);
  /* 점 격자 — 판 바탕의 얇은 점 */
  --brand-grid-dot: var(--c-neutral-200);
  --brand-grid-step: var(--sp-4);
  /* 로고 원본(brand/saltware-logo*.svg viewBox 390×64)의 치수 — 측정선·자르기 계산에만 쓴다 */
  --logo-w: 390;
  --logo-dot-max: 27.54; /* 가장 큰 점 지름 = x */
  --logo-sym-end: 67; /* 심벌 오른쪽 끝 */
  --logo-word-start: 87; /* 워드마크 왼쪽 끝 */
  --brand-face-ratio: 2 / 1;
  --brand-viz-ratio: 2 / 1;
  --brand-x-size: 28px;
}
@media (max-width: 640px) {
  .brand-sec {
    --brand-box-pad: var(--sp-5);
    --brand-gap: var(--sp-4);
  }
}
.brand-sec + .brand-sec > .container {
  padding-top: 0;
  border-top: 0;
}

/* 섹션 머리 — 번호 + 얇은 선(에디토리얼 라벨). 번호는 장식이라 CSS 카운터로. */
main {
  counter-reset: brand-sec;
}
.brand-sec {
  counter-increment: brand-sec;
}
.brand-sec .section__head {
  margin-bottom: var(--brand-head-gap);
  max-width: none;
  gap: var(--sp-4);
}
.brand-sec .section__head::before {
  content: counter(brand-sec, decimal-leading-zero);
  display: block;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-control);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-label);
  color: var(--text-secondary);
}

/* 회색 띠 — 위아래 안쪽 여백을 되살리고, 다음 섹션도 위 여백을 다시 갖는다 */
.brand-sec--band {
  background: var(--brand-band);
}
.brand-sec--band > .container,
.brand-sec--band + .brand-sec > .container {
  padding-top: var(--section-py);
}

/* 공통 상자 */
.brand-card {
  background: var(--bg-card);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-lg);
  padding: var(--brand-box-pad);
}

/* 견본 판 — 흰 바탕 + 얇은 선 + 점 격자 */
.brand-board {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: var(--bg-card);
  background-image: radial-gradient(
    circle,
    var(--brand-grid-dot) 1px,
    transparent 1.5px
  );
  background-size: var(--brand-grid-step) var(--brand-grid-step);
  background-position: center;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-lg);
}

/* 01 이름과 심벌 — 글(왼쪽) | 심벌 해부(오른쪽). 두 칸은 워드마크 견본 두 칸과 같은 열. */
.brand-split {
  display: grid;
  gap: var(--brand-gap);
}
@media (min-width: 860px) {
  .brand-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.brand-origin {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-rows: 1fr;
  max-width: 62ch;
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-control);
}
.brand-origin li {
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--border-control);
}
.brand-anatomy {
  aspect-ratio: 16 / 10;
}
.brand-anatomy svg {
  width: 100%;
  height: 100%;
  display: block;
}
.brand-anatomy__guide line {
  stroke: var(--border-control);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.brand-anatomy__box {
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}
.brand-anatomy__ring circle {
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  scale: 1.18;
}
.brand-anatomy__dot circle {
  fill: var(--c-brand-dot);
}
.brand-anatomy__dim line {
  stroke: var(--text-primary);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.brand-anatomy__x {
  font-family: var(--font-mono);
  font-size: 6px;
  fill: var(--text-primary);
}

/* 02 워드마크 — 큰 견본 2×2(밝은 · 어두운 · 사진 두 장), 이름표는 판 아래 */
.brand-sec .bg__wordmark {
  gap: var(--brand-gap);
}
.brand-stages {
  display: grid;
  gap: var(--brand-gap);
}
@media (min-width: 860px) {
  .brand-stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.brand-stage {
  margin: 0;
  display: grid;
  gap: var(--sp-3);
}
.brand-stage__face {
  aspect-ratio: var(--brand-face-ratio);
  container-type: inline-size;
}
.brand-stage__face > img:not(.brand-stage__photo) {
  position: relative;
  width: 56cqw;
  height: auto;
}
.brand-stage__face--dark {
  background-color: var(--bg-inverse);
  --brand-grid-dot: var(--c-neutral-800);
  border-color: transparent;
}
.brand-stage__face--photo {
  background-image: none;
  place-items: start;
}
.brand-stage__face--photo > img:not(.brand-stage__photo) {
  width: 34cqw;
  margin: 7cqw;
}
.brand-stage__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-stage__label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  color: var(--text-secondary);
}

/* 03 사용 규칙 — 회색 띠 위 흰 카드 2×2, 카드마다 같은 비율의 견본 판 */
.brand-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--brand-gap);
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .brand-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.brand-rules > li {
  display: grid;
  grid-template-rows: auto auto 1fr;
}
.brand-rules h3 {
  font-size: var(--fs-h4);
  line-height: var(--lh-title);
  margin: var(--sp-5) 0 var(--sp-2);
}
.brand-rules p {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}
.brand-viz {
  aspect-ratio: var(--brand-viz-ratio);
  display: grid;
  gap: var(--sp-3);
}
.brand-viz--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.brand-viz > .brand-board {
  container-type: inline-size;
}

/* 잘못된 예 — 실제 로고에 변형만 CSS 로, 오른쪽 위 ✕(선 아이콘) */
.brand-mis {
  --mis-w: 64cqw;
}
.brand-mis img {
  width: var(--mis-w);
  height: auto;
}
.brand-mis__stretch {
  scale: 1.3 0.62;
}
.brand-mis__recolor {
  filter: hue-rotate(170deg) saturate(1.4);
}
.brand-mis__x {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  display: grid;
  place-items: center;
  width: var(--brand-x-size);
  height: var(--brand-x-size);
  border-radius: var(--radius-circle);
  border: 1px solid var(--border-control);
  background: var(--bg-card);
  color: var(--text-primary);
}
.brand-mis__lock {
  display: flex;
  align-items: center;
  width: calc(var(--mis-w) * 1.1);
}
.brand-mis__lock--split {
  justify-content: space-between;
  width: calc(var(--mis-w) * 1.35);
}
.brand-mis__lock--swap {
  justify-content: center;
  gap: calc(var(--mis-w) * 20 / var(--logo-w));
}
.brand-mis__lock--swap .brand-crop--sym {
  order: 2;
}
.brand-crop {
  display: block;
  overflow: hidden;
  flex: none;
}
.brand-crop img {
  display: block;
  max-width: none;
}
.brand-crop--sym {
  width: calc(var(--mis-w) * var(--logo-sym-end) / var(--logo-w));
}
.brand-crop--word {
  width: calc(
    var(--mis-w) * (var(--logo-w) - var(--logo-word-start)) / var(--logo-w)
  );
}
.brand-crop--word img {
  margin-left: calc(var(--mis-w) * var(--logo-word-start) / var(--logo-w) * -1);
}

/* 여백 — 로고 상자 둘레 x(가장 큰 점 지름) 만큼 점선 + 치수 */
.brand-space-board {
  --space-w: 56cqw;
  --space-x: calc(var(--space-w) * var(--logo-dot-max) / var(--logo-w));
}
.brand-space {
  position: relative;
  padding: var(--space-x);
  border: 1px dashed var(--text-faint);
  background: repeating-linear-gradient(
    -45deg,
    var(--rule-track) 0 1px,
    transparent 1px var(--sp-2)
  );
}
.brand-space img {
  display: block;
  width: var(--space-w);
  height: auto;
  background: var(--bg-card);
  outline: 1px solid var(--border-control);
}
.brand-space__x {
  position: absolute;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  line-height: 1;
  color: var(--text-primary);
}
/* 위: 세로 치수(높이 x), 왼쪽: 가로 치수(폭 x) — 끝 눈금은 테두리로 */
.brand-space__x--top {
  top: 0;
  left: 50%;
  height: var(--space-x);
  padding-left: var(--sp-3);
  border-left: 1px solid var(--text-primary);
}
.brand-space__x--left {
  left: 0;
  top: 50%;
  width: var(--space-x);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--text-primary);
}

/* 최소 크기 — 큰 참고 · 실제 120px · 그보다 작은 예(✕)를 같은 바닥선에 */
.brand-size-board {
  grid-auto-flow: column;
  place-content: center;
  align-items: end;
  gap: var(--sp-6);
}
.brand-size {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
}
.brand-size img {
  display: block;
  height: auto;
}
.brand-size--ref img {
  width: 40cqw;
}
.brand-size--min img {
  width: 120px;
}
.brand-size--under img {
  width: 72px;
}
.brand-size__dim {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  line-height: 1;
  padding-bottom: var(--sp-2);
  border: 1px solid var(--text-primary);
  border-top: 0;
  color: var(--text-primary);
}
.brand-size--under .brand-mis__x {
  position: absolute;
  top: auto;
  bottom: 100%;
  right: 50%;
  translate: 50% calc(var(--sp-2) * -1);
}
@media (max-width: 639px) {
  .brand-size--ref {
    display: none;
  }
}

/* 04 컬러 — 쓰는 면적 비율 띠(바탕 크게 · 포인트 작게) + 큰 색 면 카드 */
.brand-ratio {
  display: flex;
  height: var(--sp-7);
  margin-bottom: var(--brand-gap);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.brand-ratio > span {
  display: block;
}
.brand-ratio > :nth-child(1) {
  flex: 12;
}
.brand-ratio > :nth-child(2) {
  flex: 5;
}
.brand-ratio > :nth-child(3) {
  flex: 2;
}
.brand-ratio > :nth-child(4) {
  flex: 1;
}
.bg__colors {
  gap: var(--brand-gap);
}
@media (min-width: 640px) {
  .bg__colors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .bg__colors {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.bg__color {
  gap: var(--sp-2);
  overflow: hidden;
}
.bg__chip {
  width: calc(100% + var(--brand-box-pad) * 2);
  margin: calc(var(--brand-box-pad) * -1) calc(var(--brand-box-pad) * -1) 0;
  aspect-ratio: 4 / 3;
  border: 0;
  border-bottom: 1px solid var(--border-control);
  border-radius: 0;
}
.brand-sec .bg__color-name {
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: var(--lh-title);
  margin-top: var(--sp-5);
}
.bg__color-code {
  display: block;
  color: var(--text-secondary);
}
.brand-sec .bg__color-use {
  color: var(--text-secondary);
}
.brand-copy {
  font-weight: 700;
  color: var(--text-primary);
  user-select: all;
  cursor: copy;
  padding: var(--brand-copy-py) var(--sp-1);
  margin: 0 calc(var(--brand-copy-py) * -1);
  border-radius: var(--radius-xs);
  background: var(--bg-band);
}
.brand-rgb {
  display: block;
  margin-top: var(--sp-1);
}
/* 폰: 칩을 왼쪽 정사각형으로 — 네 장이 세로로 길게 쌓이던 것을 줄인다 */
@media (max-width: 639px) {
  .bg__color {
    grid-template-columns: var(--brand-chip-sm) minmax(0, 1fr);
    column-gap: var(--sp-4);
    row-gap: var(--sp-1);
  }
  .bg__chip {
    grid-row: 1 / span 3;
    width: auto;
    margin: 0;
    aspect-ratio: 1;
    border: 1px solid var(--border-control);
    border-radius: var(--radius-md);
  }
  .brand-sec .bg__color-name {
    margin-top: 0;
  }
  .bg__color-use {
    grid-column: 1 / -1;
    margin-top: var(--sp-2);
  }
}

/* 로고 내려받기 — 줄 글자·구분선 시작을 제목 왼쪽 선에 맞춘다(호버 바탕만 sp-2 바깥으로) */
.brand-dl {
  background: var(--bg-card);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-lg);
  padding: var(--brand-box-pad);
  display: grid;
  gap: var(--sp-3);
}
.brand-dl__title {
  font-size: var(--fs-h4);
  line-height: var(--lh-title);
  margin: 0;
}
.brand-dl .bg__assets {
  grid-template-columns: 1fr;
  border-top: 0;
  column-gap: var(--brand-gap);
}
@media (min-width: 860px) {
  .brand-dl .bg__assets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.brand-dl .bg__asset {
  position: relative;
  isolation: isolate;
  min-height: var(--brand-row);
  padding: var(--sp-3) 0;
}
.brand-dl .bg__assets > :nth-last-child(-n + 2) {
  border-bottom: 0;
}
@media (max-width: 859px) {
  .brand-dl .bg__assets > :nth-last-child(2) {
    border-bottom: 1px solid var(--rule-track);
  }
}
.brand-dl a.bg__asset:hover {
  background: transparent;
}
.brand-dl a.bg__asset::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--sp-2) * -1);
  z-index: -1;
  border-radius: var(--radius-xs);
  transition: background var(--dur-hover) var(--ease);
}
.brand-dl a.bg__asset:is(:hover, :focus-visible)::before {
  background: var(--bg-band);
}
/* 내려받기 화살표 — 사이트 화살표(16×16)를 아래로 돌려 쓴다 */
.brand-dl .bg__asset-hint {
  display: grid;
  color: var(--text-accent);
}
.brand-dl .bg__asset-hint svg {
  rotate: 90deg;
  transition: translate var(--dur-hover) var(--ease);
}
.brand-dl a.bg__asset:is(:hover, :focus-visible) .bg__asset-hint svg {
  translate: 0 2px;
}

/* `[모바일 r5 2026-11-04]` 사용 규칙 카드 오른쪽 위 × 는 '잘못된 예' 표시다 — 흰 원 + 회색 테두리 모양이
   닫기 단추처럼 보여 860 이하에서는 테두리를 빼고 경고 색(옅은 바탕 + 진한 ×)으로 바꾼다. 눌리지 않는 표시. */
@media (max-width: 860px) {
  .brand-mis__x {
    border-color: transparent;
    background: var(--state-danger-bg);
    color: var(--state-danger);
    pointer-events: none;
  }
}
