/* 회사 소개 (/company) — 이 화면에만 쓰는 부품 (시안 company.css). 색은 sb.css 토큰만 쓴다 (지도 위 필터 제외).
 * 시안과 다른 점: 장르 · 연도 칩 높이는 44px 고정 대신 --control-h (점검 #13), 숫자 카드는 게임 수 카드를 뺀 셋
 * (설립 · 누적 다운로드 · 1,000만+), 주소 복사 알림(.co-toast)은 이 화면 것. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* 일본어는 낱말 사이를 띄우지 않는다 — 한국어용 keep-all(sb.css body)이면 연혁의 여는 따옴표만 한 줄에 남는 식으로 끊겨,
   일본어 줄바꿈 규칙으로 */
main:lang(ja) {
  word-break: normal;
  line-break: strict;
}

/* ---------- 머리 ---------- */
.co-head .h-display em {
  font-style: normal;
  color: var(--red-text);
}
.co-head .lead {
  max-width: 60ch;
}

/* ---------- 1. 숫자 — 설립 · 누적 다운로드 · 1,000만+ ----------
 * 좁은 화면 두 칸: 설립 | 누적 다운로드, 1,000만+ 는 아이콘 줄이 한 줄에 들게 두 칸 전체.
 * 넓은 화면 네 칸: 설립 | 누적 다운로드(두 칸) | 1,000만+ — 화면 순서와 읽는 순서가 같다 */
.co-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.co-stats__top {
  grid-column: span 2;
}
@media (min-width: 1000px) {
  .co-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .co-stats__total {
    grid-column: span 2;
  }
  .co-stats__top {
    grid-column: auto;
  }
}
.co-stats .card {
  min-height: 220px;
}
/* 좁은 화면 두 칸에서는 카드 안쪽 폭을 넘지 않게 (320px: 36px 의 '3.1억+' · '2016' 이 카드 끝에 닿거나 잘렸다) —
 * 영어 '310M+' 는 글자 폭이 넓어 더 작은 비율 (sb.css .card__stat .num 과 같은 기준) */
.co-stats .card__stat .num {
  font-size: min(clamp(36px, 5vw, 72px), 29cqw);
}
:where(:lang(en)) .co-stats .card__stat .num {
  font-size: min(clamp(36px, 5vw, 72px), 24cqw);
}
.co-stats .card--ink .eyebrow,
.co-stats .card--red .eyebrow {
  color: inherit;
  opacity: 0.7;
}
/* 빨간 칸의 꼬리표는 흰 글 70% 로는 3.5:1 (다크 3.1) — 4.5:1 이 되는 값으로 (sb.css --on-red-muted) */
.co-stats .card--red .eyebrow {
  color: var(--on-red-muted);
  opacity: 1;
}
.co-stat {
  display: grid;
  gap: 10px;
}
.co-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.co-icons img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--line);
}
@media (min-width: 1000px) {
  .co-icons img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
}

/* ---------- 소개 (시안 manifesto) — 넓은 화면은 제목 | 글 두 칸 ---------- */
.co-manifesto {
  display: grid;
  gap: 20px clamp(32px, 6vw, 96px);
}
@media (min-width: 900px) {
  .co-manifesto {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }
}
.co-manifesto__head {
  display: grid;
  gap: 12px;
}
.co-manifesto__body {
  display: grid;
  justify-items: start;
  gap: 16px;
  max-width: 62ch;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.75;
  color: var(--ink-2);
}
.co-manifesto__body .btn {
  margin-top: 8px;
}

/* ---------- 2. 하는 일 ---------- */
.co-what {
  display: grid;
  gap: var(--gap);
}
@media (min-width: 900px) {
  .co-what {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.co-what__item {
  justify-content: flex-start;
  gap: 20px;
}
.co-what__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.co-what__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--red-text);
}
.co-what__icon svg {
  width: 26px;
  height: 26px;
}
.co-what__no {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.co-what__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.co-what__title span {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.co-what__text {
  margin-top: 10px;
  color: var(--ink-2);
}
.co-what__foot {
  margin-top: auto;
}
.co-what .btn {
  align-self: flex-start;
}
.co-what .btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--dur) var(--ease);
}
.co-what .btn:hover svg {
  transform: translateX(3px);
}
/* 장르 칩은 줄을 바꿔 다 보인다 — 높이는 다른 칩처럼 --control-h (sb.css .chip) */
.co-genres {
  flex-wrap: wrap;
  overflow: visible;
}
.co-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.co-socials .social {
  width: 44px;
  height: 44px;
  aspect-ratio: auto;
  border-radius: 14px;
}
.co-socials .social svg {
  width: 20px;
  height: 20px;
}

/* ---------- 3. 연혁 ---------- */
.co-history {
  /* 연도 칩 줄 높이 = 칩(--control-h) + 위아래 12 + 밑줄 1 */
  --yearbar: calc(var(--control-h) + 25px);
  padding-bottom: clamp(24px, 4vw, 56px);
}
.co-years .chips {
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.co-years .chip[aria-current='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.co-year {
  /* html 의 scroll-padding(머리 + 12px) 에 더해, 연도 윗줄이 칩 줄 밑줄과 정확히 겹치게 멈춘다 */
  scroll-margin-top: calc(var(--yearbar) - 13px);
  padding-block: 28px 12px;
  border-top: 1px solid var(--line);
}
/* 키보드로 연혁을 거슬러 올라갈 때(Shift+Tab) 초점 잡힌 줄이 붙은 연도 줄 밑에 숨지 않게 (64px 줄의 57px 가 가려졌다) */
a.co-ev__in {
  scroll-margin-top: var(--yearbar);
}
.co-year:first-child {
  border-top: 0;
}
.co-year__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.co-year__y {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.6vw, 80px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 900px) {
  .co-year {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(0, 3fr);
    gap: 0 clamp(24px, 4vw, 64px);
    padding-block: 40px 28px;
  }
  .co-year__head {
    position: sticky;
    top: calc(var(--header-h) + var(--yearbar) + 28px);
    align-self: start;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
  }
}

/* 한 해의 기록 — 왼쪽 세로줄 위에 게임 아이콘 · 점 */
.co-events {
  --node: 44px;
  --pad: 10px;
  --time: 0px;
  position: relative;
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.co-events::before {
  content: '';
  position: absolute;
  top: 32px;
  bottom: 32px;
  left: calc(var(--pad) + var(--time) + var(--node) / 2 - 1px);
  width: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}
.co-ev__in {
  position: relative;
  display: grid;
  grid-template-columns: var(--node) minmax(0, 1fr) 18px;
  grid-template-areas:
    'node time chev'
    'node text chev';
  align-items: center;
  gap: 2px 14px;
  min-height: 64px;
  padding: 10px var(--pad);
  border-radius: var(--r-md);
}
.co-ev__in > time {
  grid-area: time;
  align-self: end;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.co-ev__node {
  grid-area: node;
  position: relative;
  z-index: 1;
}
.co-ev__text {
  grid-area: text;
  align-self: start;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.co-ev__text b {
  font-weight: 800;
  color: var(--ink);
}
.co-ev__in > svg {
  grid-area: chev;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition:
    transform var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
a.co-ev__in {
  transition: background-color var(--dur) var(--ease);
}
a.co-ev__in:hover {
  background: var(--surface);
}
a.co-ev__in:active {
  background: var(--surface-2);
}
a.co-ev__in:hover > svg {
  transform: translateX(3px);
  color: var(--ink);
}
.co-ev__icon {
  width: var(--node);
  height: var(--node);
  border-radius: 12px;
  background: var(--tile-bg);
  box-shadow: 0 0 0 4px var(--bg);
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
a.co-ev__in:hover .co-ev__icon {
  transform: scale(1.05);
  box-shadow: 0 0 0 4px var(--surface);
}
.co-ev__dot {
  justify-self: center;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow:
    inset 0 0 0 2px var(--line-strong),
    0 0 0 4px var(--bg);
}
.co-ev--mile .co-ev__dot {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: var(--red);
  box-shadow: 0 0 0 5px var(--bg);
  transform: rotate(45deg);
}
.co-ev--mile .co-ev__text {
  font-weight: 700;
  color: var(--ink);
}
.co-ev--origin .co-ev__in {
  background: var(--soft);
}
.co-ev--origin .co-ev__dot {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--red);
  box-shadow: 0 0 0 5px var(--soft);
  transform: rotate(45deg);
}
.co-ev--origin .co-ev__text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
@media (min-width: 640px) {
  .co-events {
    --time: 66px;
  }
  .co-ev__in {
    grid-template-columns: 52px var(--node) minmax(0, 1fr) 18px;
    grid-template-areas: 'time node text chev';
  }
  .co-ev__in > time {
    align-self: center;
    font-size: 13px;
  }
  .co-ev__text {
    align-self: center;
    font-size: 16px;
  }
}

/* ---------- 4. 찾아오시는 길 ---------- */
.co-loc {
  display: grid;
  gap: var(--gap);
}
@media (min-width: 900px) {
  .co-loc {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}
.co-loc__info {
  align-content: space-between;
  gap: 28px;
}
.co-loc__head {
  display: grid;
  gap: 12px;
}
.co-addr {
  margin-top: 6px;
  font-style: normal;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
}
.co-loc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.co-map {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  background: var(--tile-bg);
  box-shadow: var(--shadow-1);
}
@media (min-width: 900px) {
  .co-map {
    aspect-ratio: auto;
    min-height: 440px;
  }
}
.co-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* 다크 모드에선 지도를 어둡게 뒤집는다 (색상환은 그대로) */
:root[data-theme='dark'] .co-map iframe {
  filter: invert(0.9) hue-rotate(180deg) saturate(0.75) brightness(0.95);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .co-map iframe {
    filter: invert(0.9) hue-rotate(180deg) saturate(0.75) brightness(0.95);
  }
}

/* 주소 복사 알림 — 화면 아래 가운데에 잠깐 */
.co-toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.co-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 5. 채용 · 퍼블리싱 ---------- */
.co-next .card {
  min-height: 220px;
}
.co-next .card--ink .eyebrow {
  color: inherit;
  opacity: 0.6;
}
.co-next .pill {
  align-self: flex-start;
}
