/* 채용 첫 화면 (/careers) — 아이콘 벽 첫 화면 · 숫자 · 포지션 카드 · 회사 전경 · 복지 · 일하는 방식 · 지원 절차. 공통 부품은 careers.css.
 * 움직임 줄이기 설정이면 아이콘 벽이 멈춘다.
 * 점검 #1 — 사파리(WebKit) ≥900px 에서 첫 화면 글 칸이 0px 로 무너졌다 (auto 칸을 아이콘 원본 폭 512px 로 쟀다) → 오른쪽 칸 폭을 정해 둔다. */

/* ---------- 1. 첫 화면 ---------- */
.cr-hero {
  padding-top: 8px;
}
.cr-hero__card {
  --pad: clamp(24px, 5vw, 64px);
  /* 아이콘 벽 한 줄 폭 · 줄 사이 */
  --lane: clamp(96px, 9vw, 132px);
  --lane-gap: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  gap: 28px;
  padding: var(--pad);
  border-radius: var(--r-lg);
  background: var(--block-ink);
  color: var(--block-ink-text);
}
@media (min-width: 900px) {
  /* 높이를 정해 두고 줄을 minmax(0, 1fr) 로 — 흐르는 아이콘 벽이 카드를 늘리지 못하게.
     오른쪽 칸 = 아이콘 세 줄 폭 − 오른쪽 여백 (벽은 음수 여백으로 카드 끝까지 나간다). auto 로 두면 사파리가 글 칸을 0px 로 만든다 (점검 #1) */
  .cr-hero__card {
    grid-template-columns: minmax(0, 1fr) calc(var(--lane) * 3 + var(--lane-gap) * 2 - var(--pad));
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 4vw, 64px);
    height: clamp(500px, 42vw, 620px);
    border-radius: var(--r-xl);
  }
  .cr-wall {
    margin-right: calc(var(--pad) * -1);
  }
}
.cr-hero__text {
  container-type: inline-size;
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 18px;
  min-width: 0;
}
.cr-hero__eyebrow {
  color: color-mix(in srgb, var(--block-ink-text) 68%, transparent);
}
/* 예전 첫 화면 글 'UNBOX YOUR / IMAGINATION.' — 긴 낱말이 글 칸을 넘지 않게 칸 폭(cqi)에 맞춘다 */
.cr-hero__title {
  font-size: clamp(30px, 12.4cqi, 96px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.cr-hero__title em {
  font-style: normal;
  color: var(--yellow);
}
.cr-hero__lead {
  max-width: 40ch;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
  color: color-mix(in srgb, var(--block-ink-text) 82%, transparent);
}
.cr-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

/* 게임 아이콘 벽 — 넓은 화면은 세로로 흐르는 세 줄, 휴대폰은 가로로 흐르는 두 줄 */
.cr-wall {
  display: flex;
  gap: var(--lane-gap);
  align-self: stretch;
  min-width: 0;
  margin-block: calc(var(--pad) * -1);
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}
.cr-wall__lane {
  flex: 0 0 var(--lane);
  display: flex;
  flex-direction: column;
  gap: var(--lane-gap);
  animation: cr-up var(--dur, 50s) linear infinite;
}
.cr-wall__lane:nth-child(2) {
  margin-top: -56px;
  animation-direction: reverse;
}
.cr-wall img {
  flex: none;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 24%;
  background: color-mix(in srgb, var(--block-ink-text) 10%, transparent);
}
@keyframes cr-up {
  to {
    transform: translateY(-50%);
  }
}
@media (max-width: 899px) {
  .cr-wall {
    flex-direction: column;
    gap: 10px;
    margin-block: 0 calc(var(--pad) * -1 + 8px);
    margin-inline: calc(var(--pad) * -1);
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  }
  .cr-wall__lane {
    flex: none;
    flex-direction: row;
    gap: 10px;
    width: max-content;
    animation-name: cr-left;
  }
  .cr-wall__lane:nth-child(2) {
    margin-top: 0;
    margin-left: -37px;
  }
  .cr-wall__lane:nth-child(3) {
    display: none;
  }
  .cr-wall img {
    width: 64px;
  }
}
@keyframes cr-left {
  to {
    transform: translateX(-50%);
  }
}

/* 숫자 — 전체 누적 다운로드(downloads.ts) · 열린 포지션(API) · 설립. 게임 수는 쓰지 않는다. 넓은 화면은 칸 수(--n)만큼 한 줄 */
.cr-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin: var(--gap) 0 0;
  padding: 0;
  list-style: none;
}
/* 휴대폰 두 칸에서 홀수 개면 마지막 칸을 넓게 */
.cr-facts li:last-child:nth-child(odd) {
  grid-column: span 2;
}
@media (min-width: 900px) {
  .cr-facts {
    grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  }
  .cr-facts li:last-child:nth-child(odd) {
    grid-column: auto;
  }
}
.cr-facts li {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 120px;
  padding: clamp(18px, 2vw, 26px);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.cr-facts .num {
  font-size: clamp(32px, 4vw, 52px);
  white-space: nowrap;
}
.cr-facts span {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink-2);
}

/* ---------- 2. 포지션 ---------- */
.cr-job {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.cr-job__title {
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.cr-job__title a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: text-decoration-color var(--dur) var(--ease);
}
.cr-job__title a:hover {
  text-decoration-color: currentColor;
}
.cr-job__summary {
  max-width: 62ch;
  line-height: 1.7;
  color: var(--ink-2);
}
.cr-job__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cr-more > span {
  display: inline-flex;
}
@media (max-width: 479px) {
  .cr-job__actions .btn {
    flex: 1;
  }
}

/* 포지션 칸 머리 오른쪽 — 개수 · 전체 공고 보기 */
.cr-positions__aside {
  display: grid;
  justify-items: start;
  gap: 2px;
}
@media (min-width: 640px) {
  .cr-positions__aside {
    justify-items: end;
    text-align: right;
  }
}
/* 앞 네 개 아래 — 채용 공고 더보기 (+N) · 전체 공고에서 찾아보기 */
.cr-jobs__more {
  justify-self: start;
}

/* ---------- 회사 전경 — 사진 일곱 장(입구 사진은 두 칸) + 배너 한 문장 ---------- */
.cr-office {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
@media (min-width: 900px) {
  .cr-office {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.cr-office__photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: var(--r-md);
  background: var(--tile-bg);
}
.cr-office__photo.is-wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}
/* 넓은 화면 — 입구 사진은 옆 두 장과 같은 줄 높이로 늘어난다 */
@media (min-width: 900px) {
  .cr-office__photo.is-wide {
    aspect-ratio: auto;
  }
}
.cr-office__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}
.cr-office__photo:hover img {
  transform: scale(1.04);
}
.cr-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: clamp(220px, 30vw, 400px);
  margin: var(--gap) 0 0;
  border-radius: var(--r-xl);
  background: var(--tile-bg);
  color: #fff;
}
.cr-banner img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cr-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(12, 8, 7, 0.8), rgba(12, 8, 7, 0.28) 55%, rgba(12, 8, 7, 0));
}
.cr-banner figcaption {
  position: absolute;
  left: clamp(20px, 4vw, 48px);
  right: clamp(20px, 4vw, 48px);
  bottom: clamp(20px, 3.6vw, 44px);
  font-size: clamp(22px, 3.2vw, 44px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* ---------- 복지 — 예전 화면의 여섯 가지 ---------- */
.cr-benefits {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 560px) {
  .cr-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .cr-benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.cr-benefit {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: clamp(22px, 2.6vw, 32px);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.cr-benefit__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--red-text);
}
.cr-benefit__icon svg {
  width: 26px;
  height: 26px;
}
.cr-benefit__title {
  font-size: clamp(18px, 1.7vw, 21px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.cr-benefit p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ---------- 3. 일하는 방식 ---------- */
.cr-ways {
  display: grid;
  gap: var(--gap);
}
@media (min-width: 900px) {
  .cr-ways {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cr-way--ink {
    grid-row: span 2;
  }
}
@media (min-width: 1200px) {
  .cr-ways {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .cr-way--ink {
    grid-row: auto;
  }
}
.cr-way {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.cr-way--ink {
  background: var(--block-ink);
  color: var(--block-ink-text);
}
.cr-way--yellow {
  background: var(--yellow);
  color: var(--yellow-ink);
}
.cr-way__num {
  font-size: 14px;
  opacity: 0.6;
}
/* 노란 칸 위에서는 60% 로 3.97:1 (다크 3.82) — 4.5:1 이 되게 */
.cr-way--yellow .cr-way__num {
  opacity: 0.7;
}
.cr-way__title {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.cr-way__body {
  line-height: 1.65;
  opacity: 0.86;
}
.cr-way__data {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}
.cr-way__fact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 14px;
  font-weight: 700;
}
.cr-way__fact .num {
  font-size: 40px;
}
.cr-way__quote {
  display: grid;
  gap: 12px;
  margin: 4px 0 0;
  padding: 0;
}
.cr-way__quote p {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* 장르 막대 — 지금까지 만든 게임 (API 게임 카드) */
.cr-bar {
  display: flex;
  gap: 3px;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
}
.cr-bar__seg {
  flex-basis: 0;
  min-width: 6px;
}
.cr-bar__seg--0 {
  background: var(--red);
}
.cr-bar__seg--1 {
  background: var(--yellow);
}
.cr-bar__seg--2 {
  background: color-mix(in srgb, var(--block-ink-text) 85%, transparent);
}
.cr-bar__seg--3 {
  background: color-mix(in srgb, var(--block-ink-text) 55%, transparent);
}
.cr-bar__seg--4 {
  background: color-mix(in srgb, var(--block-ink-text) 32%, transparent);
}
.cr-bar__seg--5 {
  background: color-mix(in srgb, var(--block-ink-text) 18%, transparent);
}
.cr-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.86;
}
.cr-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cr-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.cr-legend b {
  font-family: var(--font-display);
  font-size: 12px;
}
.cr-hits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cr-hits img {
  width: clamp(40px, 10.5vw, 48px);
  height: clamp(40px, 10.5vw, 48px);
  border-radius: 13px;
  background: var(--tile-bg);
}

/* ---------- 4. 지원 절차 ---------- */
.cr-process__note {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.cr-steps {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cr-step {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 4px;
  align-items: start;
  align-content: start;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.cr-step__num {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--bg);
  font-size: 18px;
}
.cr-step:last-child .cr-step__num {
  background: var(--red);
  color: var(--block-ink-text);
}
.cr-step__title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.cr-step p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}
/* 휴대폰: 세로로 잇는 선, 넓은 화면: 가로로 잇는 선 */
.cr-steps::before {
  content: '';
  position: absolute;
  left: 47px;
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: var(--line-strong);
}
@media (min-width: 900px) {
  .cr-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
  }
  .cr-steps::before {
    left: 40px;
    right: 40px;
    top: 51px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
  .cr-step {
    grid-template-columns: 1fr;
    row-gap: 10px;
    padding: 24px;
  }
  .cr-step__num {
    grid-row: auto;
    margin-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cr-wall__lane {
    animation: none;
  }
}
