/* ==========================================================
   홈 — 벤토 그리드 (라이트)

   한 화면에 들어가는 요약면. 칸마다 한 가지만 담고 설명 문단은 두지
   않는다. 긴 설명은 COMPANY 페이지와 llms.txt 가 맡는다.

   as-is 홈은 전체화면 캐러셀 하나였다. 화면의 글이 전부 프로젝트
   카피였고 회사를 설명하는 문장이 없었다.

   12칸 × 5줄 고정. 내용이 높이를 정하면 세로로 길어진다.
   as-is CSS(base.css / style.css)는 손대지 않고 .bento 아래로만 쓴다.
   ========================================================== */

/* as-is 홈은 캐러셀을 전체화면으로 깔려고 #wrap.l-main 의 padding 을 0 으로
   뒀다. 아이디가 들어간 선택자라 #wrap 의 값이 먹지 않는다. 다시 잡는다.
   파일 맨 앞에 둔다 — 아래 블록을 손볼 때 같이 지워지는 일이 두 번 있었다. */
#wrap.l-main { padding: 64px 0 0; background: #fff; }

@media (max-width: 1199px) {
  #wrap.l-main { padding: 56px 0 0; }
}

/* 푸터를 화면 아래에 붙인다.
   창을 세로로 늘리면 내용은 그대로인데 푸터 아래에 빈 띠가 남았다.
   기둥을 세로 플렉스로 두고 본문이 남는 높이를 먹게 한다. 벤토는
   그 안에서 가운데에 선다 — 위아래가 같아야 남는 공간이 여백으로 읽힌다. */
#wrap.l-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#wrap.l-main > #container {
  display: flex;
  flex: 1 0 auto;
  min-height: 0;
}

#wrap.l-main .bento {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  /* 여유가 있을 때만 위아래로 띄운다. 낮은 창에서는 0.
     좌우 40px — 격자가 flex 로 늘어나므로 여백은 여기서 준다 */
  padding: clamp(0px, calc(100vh - 1000px), 22px) 40px;
}

#wrap.l-main .bento > .bento__grid { flex: 1; }

#footer.bento-footer { flex: 0 0 auto; }

/* 세로로 좁은 화면에서는 억지로 한 화면에 넣지 않는다.
   줄마다 최소 높이가 있어서 그 아래로는 안 줄고 페이지가 길어진다 */
@media (max-height: 820px), (max-width: 1199px) {
  /* 좌우 여백은 그대로 둔다. 0 으로 두면 낮은 창에서 카드가 화면 끝에 붙는다 */
  #wrap.l-main .bento { align-items: flex-start; padding: 16px 40px; }
}

.bento {
  --b-gap: 14px;
  /* 창 높이에 맞춰 줄을 늘린다. 고정값이면 세로로 긴 창에서 위아래로
     빈 띠가 남는다. 머리 64 + 발 40 + 위아래 여백 44 + 줄새 56 을 빼고
     2×1.103 + 3 줄로 나눈 값이다 */
  --b-row: clamp(146px, calc(19.2vh - 39px), 212px);
  --b-radius: 8px;   /* 사이트 전체가 직각에 가깝다. 서브페이지와 맞춘다 */
  --b-ink: #16161a;
  --b-muted: #70707a;
  --b-surface: #f6f4f8;
  --b-surface2: #eae7ee;
  --b-purple: #752bef;
  --b-on: #e8341f;
  padding: 6px 0 0;
}

/* as-is base.css 가 h1·h2·p·span·dd 같은 요소마다 색(#111)과
   word-break:break-all 을 직접 박아 둔다. 칸 안에서는 되돌린다.
   개별 규칙이 이보다 뒤에 와야 한다. */
.bento * { color: inherit; word-break: keep-all; overflow-wrap: break-word; }

.bento__grid {
  display: grid;
  max-width: 1600px;
  margin: 0 auto;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  /* 첫 줄만 10% 높다. 누구인가와 MAX 가 나머지보다 위에 있다는 걸
     크기로 말한다. 둘 다 두 줄을 차지하므로 146×2+14=306 → 336 */
  grid-template-rows: repeat(2, calc(var(--b-row) * 1.103)) repeat(3, var(--b-row));
  grid-auto-rows: var(--b-row);
  gap: var(--b-gap);
}

.bento__cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 22px 24px;
  border-radius: var(--b-radius);
  background: var(--b-surface);
  color: var(--b-ink);
  overflow: hidden;
}

/* 칸 배치 — 1440 기준 5줄이면 한 화면에 들어온다.
   비주얼이 큰 칸(MAX·레퍼런스)을 위 두 덩이에 두고,
   숫자·로고·문의는 마지막 줄에 작게 늘어놓는다 */
.bento__cell--identity { grid-column: 1 / span 6;  grid-row: 1 / span 2; padding: 32px; justify-content: center; }
.bento__cell--ax       { grid-column: 7 / span 6;  grid-row: 1 / span 2; }
.bento__cell--refs     { grid-column: 1 / span 7;  grid-row: 3 / span 2; padding: 0; }
.bento__cell--ongoing  { grid-column: 8 / span 5;  grid-row: 3 / span 2; }
.bento__cell--fig      { grid-column: span 2;      grid-row: 5; }
.bento__cell--clients  { grid-column: span 4;      grid-row: 5; }

/* ==========================================================
   마이크로 인터랙션 — 칸마다 손이 닿으면 반응한다.
   움직임은 2~4px 과 3% 안쪽으로만. 벤토는 훑는 면이라 크게 움직이면
   시선이 끌려다닌다.
   ========================================================== */

.bento__cell {
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), background-color .3s ease;
}

.bento__cell:hover { transform: translateY(-2px); }

/* 숫자 — 아래에서 보라가 차오르고 글자가 흰색으로 바뀐다 */
.bento__cell--fig { position: relative; isolation: isolate; }

.bento__cell--fig::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--b-purple);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .42s cubic-bezier(.65, 0, .35, 1);
  content: '';
}

.bento__cell--fig:hover::before { transform: scaleY(1); }

/* 맨 앞 업력 카드는 채워진 상태가 기본이다. 올려두면 한 단계 깊어진다 */
.bento__cell--fig-lead::before { transform: scaleY(1); transition: background .28s ease; }
.bento__cell--fig-lead:hover::before { background: #6322d6; }
.bento__cell--fig-lead .bento__fig-num,
.bento__cell--fig-lead .bento__caption { color: #fff; }

.bento__cell--fig .bento__fig-num,
.bento__cell--fig .bento__caption { transition: color .28s ease .1s; }
.bento__cell--fig:hover .bento__fig-num,
.bento__cell--fig:hover .bento__caption { color: #fff; }

/* 크기 변환은 뺀다. 숫자가 커졌다 작아지면 글자가 떨려 보인다 */

/* MAX — 영상이 살짝 들어온다 */
.bento__cell--ax .bento__video { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.bento__cell--ax:hover .bento__video { transform: scale(1.04); }
.bento__cell--ax { transform: none; }
.bento__cell--ax:hover { transform: none; }

/* 칩 */
.bento__chips li { transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.bento__chips li:hover { transform: translateY(-2px); background: #7eecec; box-shadow: 0 4px 12px rgba(1, 227, 227, .4); }

/* 고객사 — 올려두면 멈추고 로고가 또렷해진다 */
.bento__cell--clients:hover .bento__logos { animation-play-state: paused; }
.bento__logos li { transition: transform .2s ease; }
.bento__logos img { transition: opacity .25s ease, filter .25s ease; }
.bento__cell--clients:hover .bento__logos img { filter: grayscale(.2); opacity: .95; }
.bento__logos li:hover { transform: translateY(-2px); }

/* 운영 카드 — 점이 커지고 카드가 살짝 밀린다 */
.bento__ongoing li { transition: transform .2s ease, box-shadow .2s ease; }
.bento__ongoing li:hover { transform: translateX(3px); box-shadow: 0 4px 14px rgba(22, 22, 26, .07); }
.bento__msg-mark { transition: box-shadow .25s ease; }
.bento__ongoing li:hover .bento__msg-mark { box-shadow: 0 0 0 5px rgba(232, 52, 31, .16); }

/* 레퍼런스 — 칸 자체는 움직이지 않는다. 안에서 흐르고 있다 */
.bento__cell--refs { transform: none; }
.bento__cell--refs:hover { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .bento__cell,
  .bento__cell:hover,
  .bento__fig-num,
  .bento__cell--fig:hover .bento__fig-num,
  .bento__cell--ax:hover .bento__video,
  .bento__chips li:hover,
  .bento__logos li:hover,
  .bento__ongoing li:hover { transform: none; }
}

/* ---------- 공통 ---------- */

/* 아이콘은 글자와 같은 줄에서 가운데를 맞춘다 */
.bento svg { flex: 0 0 auto; display: inline-block; vertical-align: -0.15em; }
.bento__caption { display: flex; align-items: center; gap: 5px; }
.bento__on { display: inline-flex; align-items: center; }

/* 운영 칸 꼬리표는 #ON 한 마디만 둔다. 목록이 이미 무엇인지 말하고 있다 */
.bento__cell--ongoing .bento__caption { font-weight: 500; }


.bento__caption {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--b-muted);
}

.bento__on { color: var(--b-on); }

.bento__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.bento__btn {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--b-ink);
  border-radius: 999px;
  background: var(--b-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.bento__btn:hover { background: #000; }
.bento__btn--ghost { background: transparent; color: var(--b-ink); }
.bento__btn--ghost:hover { background: var(--b-ink); color: #fff; }
.bento__btn--sm { height: 36px; padding: 0 16px; font-size: 13px; }

/* ---------- 누구인가 — 떠다니는 구체 ----------
   좌우로 크게 흐르게 둔다. 글자 뒤에 깔리는 장식이라 흐리게 두고
   대비는 건드리지 않는다. */

.bento__cell--identity { position: relative; isolation: isolate; }
.bento__cell--identity > *:not(.fx-orbs) { position: relative; }

.bento__orbs {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  pointer-events: none;
}

.bento__orbs > span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(44px);
  will-change: transform;
}

.bento__orbs > span:nth-child(1) {
  top: -26%;
  left: 38%;
  width: 46%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(160, 40, 255, .62), rgba(160, 40, 255, 0) 68%);
  animation: bento-orb-a 14s ease-in-out infinite;
}

.bento__orbs > span:nth-child(2) {
  bottom: -34%;
  left: 52%;
  width: 42%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(1, 227, 227, .66), rgba(1, 227, 227, 0) 68%);
  animation: bento-orb-b 11s ease-in-out infinite;
}

.bento__orbs > span:nth-child(3) {
  top: 16%;
  left: 74%;
  width: 30%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(83, 58, 253, .5), rgba(83, 58, 253, 0) 68%);
  animation: bento-orb-c 17s ease-in-out infinite;
}

@keyframes bento-orb-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(-58%, 16%) scale(1.16); }
  50%      { transform: translate(38%, 32%) scale(.9); }
  75%      { transform: translate(-16%, -10%) scale(1.08); }
}

@keyframes bento-orb-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  30%      { transform: translate(-72%, -28%) scale(1.22); }
  60%      { transform: translate(26%, -12%) scale(.88); }
}

@keyframes bento-orb-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  35%      { transform: translate(-96%, 34%) scale(1.3); }
  70%      { transform: translate(-34%, -24%) scale(.94); }
}

@media (prefers-reduced-motion: reduce) {
  .bento__orbs > span { animation: none; }
}

/* ---------- 누구인가 ---------- */

/* 한글 폰트가 400·500·700 뿐이라 700 위로는 올릴 데가 없다.
   주요 단어를 700 에 두려면 나머지를 500 으로 내리는 수밖에 없다.
   줄은 마크업에서 끊으므로 balance 는 쓰지 않는다 */
.bento__lede {
  /* 1390px 부터 32px 로 찬다. 좁아지면 따라 줄되 24px 아래로는 안 간다 */
  font-size: clamp(24px, 2.3vw, 32px);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -.04em;
}

.bento__lede b { font-weight: 700; }

/* ---------- MAX ---------- */

.bento__cell--ax {
  position: relative;
  justify-content: flex-end;
  padding: 22px 26px;
  background: #0f0c21;
  color: #fff;
}

.bento__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* 영상이 내용을 말하는 칸이다. 글을 읽을 만큼만 아래를 눌러 준다 */
.bento__cell--ax::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,12,33,0) 56%, rgba(15,12,33,.62) 82%, rgba(15,12,33,.84) 100%);
  content: '';
}

.bento__ax-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
}

.bento__ax-title {
  font-size: clamp(18px, 1.5vw, 23px);
  font-weight: 500;
  letter-spacing: -.02em;
  text-shadow: 0 2px 14px rgba(15,12,33,.6);
}

.bento__ax-links { display: flex; gap: 16px; margin-left: auto; }

.bento__ax-links a {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.45);
  padding-bottom: 2px;
}

.bento__ax-links a:hover { border-bottom-color: #fff; }

/* ---------- 숫자 ---------- */

/* 레이블은 왼쪽 위, 숫자는 오른쪽 아래 */
.bento__cell--fig .bento__caption {
  order: -1;
  margin-top: 0;
  padding-top: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.bento__cell--fig .bento__fig-num { margin-top: auto; justify-content: flex-end; }

/* 숫자와 단위는 밑줄(베이스라인)을 맞춘다. base.css 가 span 의 정렬을
   건드려서 그냥 두면 단위가 위첨자처럼 떠 보인다 */
.bento__fig-num {
  display: flex;
  align-items: baseline;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
}
.bento__fig-num span { margin-left: 4px; font-size: 15px; font-weight: 600; letter-spacing: 0; line-height: 1; }

/* ---------- 지금 운영 중 — 세로로 흐르는 목록 ---------- */

.bento__on { color: var(--b-on); }

.bento__vticker {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}

.bento__vticker-track {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: bento-vticker 20s linear infinite;
}

/* 읽거나 누르려는 사람을 위해 올려두면 멈춘다 */
.bento__cell--ongoing:hover .bento__vticker-track,
.bento__cell--ongoing:focus-within .bento__vticker-track { animation-play-state: paused; }

.bento__ongoing { display: flex; flex-direction: column; gap: 10px; }

/* 메시지 카드처럼. 윗줄은 이름과 기간, 아랫줄은 분류 */
/* 흰 쪽지가 떠 보이려면 바닥이 한 단계 내려가야 한다.
   다른 칸보다 조금만 더 어둡게 둔다 */
.bento__cell--ongoing { background: #edeaf2; }

.bento__ongoing li {
  border-radius: 8px;
  background: #fff;
}

.bento__ongoing a { display: block; padding: 26px 20px; }

.bento__msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bento__msg-mark {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--b-on);
  box-shadow: 0 0 0 3px rgba(232, 52, 31, .14);
}

.bento__msg-head b {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bento__msg-sub {
  display: block;
  margin-top: 9px;
  padding-left: 16px;
  font-size: 13px;
  color: var(--b-muted);
}

.bento__ongoing a:hover .bento__msg-head b { text-decoration: underline; text-underline-offset: 3px; }

/* 두 벌 중 한 벌만큼 올리면 제자리로 돌아온다 (가운데 gap 8px 포함) */
@keyframes bento-vticker {
  from { transform: translateY(0); }
  to   { transform: translateY(calc(-50% - 5px)); }
}

@media (prefers-reduced-motion: reduce) {
  .bento__vticker-track { animation: none; }
  .bento__vticker { overflow-y: auto; }
}

/* ---------- 대표 레퍼런스 — 왼쪽으로 흐르는 띠 ---------- */

/* 카드가 칸 끝에서 그대로 잘리게 둔다. 페이드를 씌우면 카드 색이
   바래 보인다 */
.bento__cell--refs { overflow: hidden; }

.bento__refs-track {
  display: flex;
  gap: 10px;
  height: 100%;
  /* 내용만큼 넓어져야 한다. 칸 폭으로 잡히면 translateX(-50%) 가
     칸의 절반밖에 안 밀려 한 장 넘기고 되돌아온다 */
  width: max-content;
  animation: bento-refs 80s linear infinite;
}

/* 읽거나 누르려는 사람을 위해 올려두면 멈춘다 */
.bento__cell--refs:hover .bento__refs-track,
.bento__cell--refs:focus-within .bento__refs-track { animation-play-state: paused; }

.bento__cell--refs .l-featured { flex: 0 0 auto; display: flex; height: 100%; margin: 0; }
.bento__cell--refs .l-featured-list { display: flex; gap: 10px; height: 100%; }
.bento__cell--refs .l-featured-item { flex: 0 0 auto; height: 100%; }
.bento__cell--refs .l-featured-item > a { height: 100%; }

/* 840×400 비율을 지킨 채 칸 높이에 맞춘다 */
.bento__cell--refs .l-featured-thumb { height: 100%; width: auto; aspect-ratio: 840 / 400; }
/* 홈에서는 흰 박스를 걷고 이미지 위에 흰 글자로 올린다.
   배경 색이 카드마다 달라(파랑·연보라·노랑) 글자만 올리면 묻히므로
   아래쪽만 어둡게 깔아 둔다 */
.bento__cell--refs .l-featured-thumb::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.34) 40%, rgba(0,0,0,0) 72%);
  content: '';
}

.bento__cell--refs .l-featured-info {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 22px;
  z-index: 1;
  width: 60%;
  padding: 0;
  background: none;
  transform: translateY(-50%);
}

.bento__cell--refs .l-featured-label {
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.88);
}

.bento__cell--refs .l-featured-label--manage { color: rgba(255,255,255,.88); }

.bento__cell--refs .l-featured-name {
  /* 한글 폰트(Noto Sans KR)가 400·500·700 만 올라가 있어 800 을 줘도
     700 으로 떨어진다. 굵기 대신 크기로 무게를 준다. */
  font-size: 32px;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -.025em;
  color: #fff;
}

/* 두 벌 중 한 벌만큼 밀면 제자리로 돌아온다 (가운데 gap 10px 포함) */
@keyframes bento-refs {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 5px)); }
}

@media (prefers-reduced-motion: reduce) {
  .bento__refs-track { animation: none; }
  .bento__cell--refs { overflow-x: auto; }
}

/* ---------- 하는 일 — 첫 칸 안의 칩 ---------- */

.bento__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

.bento__chips li {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(156, 242, 242, .6); /* 글자는 그대로 두고 바탕만 흐리게 */
  color: #0e4f4f;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.015em;
}

/* ---------- 고객사 — 두 줄 티커 ---------- */

/* 칩 58px 두 줄 + 가운데 6px = 122. 칸 146px 에 위아래 12px 씩 남는다 */
.bento__cell--clients { padding: 12px 0; }


.bento__ticker {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.bento__ticker-row { display: flex; gap: 8px; min-width: 0; }

.bento__logos {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: bento-ticker 22s linear infinite;
}

/* 아랫줄은 반대로 흐른다 */
.bento__ticker-row--back .bento__logos { animation-direction: reverse; animation-duration: 26s; }

.bento__logos li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  padding: 0 22px;
  border-radius: 8px;
  background: #fff;
}

.bento__logos img {
  width: auto;
  max-width: none;
  height: 26px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .78;
}

@keyframes bento-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100% - 6px)); }
}

@media (prefers-reduced-motion: reduce) {
  .bento__logos { animation: none; }
  .bento__ticker-row { overflow-x: auto; }
}

/* ==========================================================
   홈 푸터 — 한 줄. 왼쪽은 회사, 오른쪽은 바로가기.
   가운뎃점으로 묶어 덩어리로 읽히게 한다.
   서브페이지는 공통 푸터를 그대로 쓴다.
   ========================================================== */

#footer.bento-footer {
  position: static;
  left: auto;
  bottom: auto;
  width: min(1600px, calc(100% - 80px));
  max-height: none;
  /* as-is 는 좁은 화면에서 푸터에 min-height:250px 를 깐다.
     공통 푸터는 로고와 바로가기 두 덩이지만 홈 푸터는 한 줄이다 */
  min-height: 0;
  height: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

/* style.css 의 `.l-main #footer > p` 가 색을 흰색으로, 정렬을 가운데로
   잡고 있다. 아이디가 들어간 선택자라 클래스만으로는 못 이긴다. */
#footer.bento-footer p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-size: 12px;
  text-align: left;
  color: #8a8a93;
}

#footer.bento-footer b { font-weight: 600; color: #5c5c63; }
#footer.bento-footer .bento-footer__mark { font-weight: 400; color: #8a8a93; }

/* 항목 사이에 가운뎃점을 넣어 덩어리로 묶는다 */
#footer.bento-footer p > * + *::before {
  margin: 0 8px;
  color: #c4c4cb;
  content: '·';
}

#footer.bento-footer a { color: #6b6b73; }
#footer.bento-footer .bento-footer__copy a:hover { color: #16161a; }
#footer.bento-footer .bento-footer__links a:hover { color: #16161a; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 767px) {
  #footer.bento-footer {
    /* 벤토 좌우 여백(16px)과 같은 기준선에 선다 */
    width: calc(100% - 32px);
    height: auto;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0 20px;
  }
  #footer.bento-footer p { font-size: 11.5px; }

  /* 가운뎃점으로 묶은 한 줄이 접히면 점이 줄 머리에 남는다.
     좁은 화면에서는 점을 걷고 줄을 나눈다 */
  #footer.bento-footer .bento-footer__copy { display: block; line-height: 1.75; }
  #footer.bento-footer .bento-footer__copy > * { display: block; }
  #footer.bento-footer .bento-footer__copy > * + *::before { margin: 0; content: none; }
}

/* ==========================================================
   첫 진입 — 뼈대

   칸을 따로 그리지 않는다. 진짜 칸을 회색으로 덮었다가 걷는다.
   모양이 어긋날 일도, 걷힐 때 화면이 밀릴 일도 없다.
   내용은 HTML 에 그대로 있고 여기서는 보이지만 않게 한다.
   ========================================================== */

html.is-booting .bento__cell {
  position: relative;
  overflow: hidden;
  background: #e9e9ee;
  transform: none;
}

/* ::before 로 깔린 보라(숫자 카드)도 같이 덮는다 */
html.is-booting .bento__cell > *,
html.is-booting .bento__cell--fig::before { opacity: 0; }

/* 다만 첫 카드의 구체는 뼈대 동안에도 켜 둔다. 인트로에서 넘어온
   구체가 여기서 끊기면 바통이 땅에 떨어진 것처럼 보인다 */


html.is-booting .bento__cell::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, .72) 50%, transparent 82%);
  background-size: 220% 100%;
  animation: boot-shimmer 1.15s linear infinite;
  content: '';
}

@keyframes boot-shimmer {
  from { background-position: 140% 0; }
  to   { background-position: -40% 0; }
}

/* 걷힌 뒤 — 왼쪽 위에서 오른쪽 아래로 차례로 밝아진다.
   animation 은 쓰지 않는다. 칸의 직계 자식 중에는 포폴·운영·고객사
   띠가 있고 그것들은 자기 animation 으로 흐르고 있다. 여기서 animation
   을 걸면 그 흐름을 덮어써서 띠가 멈춘다. opacity 전환만 건다. */
html.is-booted .bento__cell > * { transition: opacity .4s ease; }
html.is-booted .bento__cell:nth-child(1) > * { transition-delay: 0s; }    /* 누구인가 — 아래에서 따로 짠다 */
html.is-booted .bento__cell:nth-child(2) > * { transition-delay: .05s; }  /* MAX */
html.is-booted .bento__cell:nth-child(3) > * { transition-delay: .1s; }   /* 포폴 */
html.is-booted .bento__cell:nth-child(4) > * { transition-delay: .15s; }  /* 운영 */
html.is-booted .bento__cell:nth-child(5) > * { transition-delay: .2s; }   /* 업력 */
html.is-booted .bento__cell:nth-child(6) > * { transition-delay: .24s; }
html.is-booted .bento__cell:nth-child(7) > * { transition-delay: .28s; }
html.is-booted .bento__cell:nth-child(8) > * { transition-delay: .32s; }
html.is-booted .bento__cell:nth-child(9) > * { transition-delay: .36s; }  /* 고객사 */

@media (prefers-reduced-motion: reduce) {
  html.is-booting .bento__cell::after { animation: none; }
  html.is-booted .bento__cell > * { transition: none; }
}

/* ==========================================================
   누구인가 칸 — 들어오는 차례

   구체가 먼저 번지고, 글이 줄마다 아래에서 떠오르고, 칩이
   왼쪽에서 밀려 들어온다.

   fill-mode 는 both 가 아니라 backwards 다. both 로 두면 끝난 뒤에도
   transform 을 붙들고 있어서 칩의 호버가 먹지 않는다.
   ========================================================== */

.bento__lede-line { display: block; }

/* 이 칸은 아래에서 따로 짠다. 일반 등장 전환은 끈다.
   배경 그라디언트는 빼놓는다 — 저도 1 로 올려버리면 글이 묻힌다 */
html.is-booted .bento__cell--identity > *:not(.fx-orbs) {
  opacity: 1;
  transition: none;
}

html.is-booted .bento__lede-line {
  animation: ident-line .55s cubic-bezier(.2, .8, .2, 1) backwards;
}

html.is-booted .bento__lede-line:nth-child(1) { animation-delay: .1s; }
html.is-booted .bento__lede-line:nth-child(2) { animation-delay: .22s; }
html.is-booted .bento__lede-line:nth-child(3) { animation-delay: .34s; }

html.is-booted .bento__chips li {
  animation: ident-chip .42s cubic-bezier(.2, .8, .2, 1) backwards;
}

html.is-booted .bento__chips li:nth-child(1) { animation-delay: .46s; }
html.is-booted .bento__chips li:nth-child(2) { animation-delay: .52s; }
html.is-booted .bento__chips li:nth-child(3) { animation-delay: .58s; }
html.is-booted .bento__chips li:nth-child(4) { animation-delay: .64s; }

@keyframes ident-line {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes ident-chip {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.is-booted .bento__lede-line,
  html.is-booted .bento__chips li { animation: none; }
}

/* ==========================================================
   첫 진입 ② 카드가 늘어지며 자리를 잡는다

   Lusion 은 카드를 메시로 휘게 한다(WebGL). CSS 로는 못 하지만
   「가로로 눌렸다 펴지며 살짝 지나쳤다 돌아오는」 느낌은 낼 수 있다.
   fill-mode 는 backwards — forwards 로 두면 끝난 뒤에도 transform 을
   붙들고 있어서 칸의 호버가 먹지 않는다.
   ========================================================== */

html.is-booted .bento__cell {
  animation: boot-stretch .55s cubic-bezier(.22, 1.18, .36, 1) backwards;
}

html.is-booted .bento__cell:nth-child(1) { animation-delay: 0s; }
html.is-booted .bento__cell:nth-child(2) { animation-delay: .05s; }
html.is-booted .bento__cell:nth-child(3) { animation-delay: .1s; }
html.is-booted .bento__cell:nth-child(4) { animation-delay: .15s; }
html.is-booted .bento__cell:nth-child(5) { animation-delay: .2s; }
html.is-booted .bento__cell:nth-child(6) { animation-delay: .24s; }
html.is-booted .bento__cell:nth-child(7) { animation-delay: .28s; }
html.is-booted .bento__cell:nth-child(8) { animation-delay: .32s; }
html.is-booted .bento__cell:nth-child(9) { animation-delay: .36s; }

@keyframes boot-stretch {
  from { transform: scale3d(.9, .965, 1); }
  to   { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.is-booted .bento__cell { animation: none; }
}

/* ==========================================================
   첫 진입 ③ 껍데기 — GNB 와 푸터는 맨 마지막에

   칸이 다 차고 한 박자 쉰 뒤에 들어온다. 먼저 들어오면 아직 비어
   있는 화면에 테두리만 쳐 놓은 꼴이 된다.

   홈에서만 그렇게 한다. 서브페이지는 기다릴 내용이 없다 —
   #header 와 #footer 가 #wrap 안에 있어서 .l-main 으로 가를 수 있다.
   ========================================================== */

html.is-booting #wrap.l-main > #header,
html.is-booting #wrap.l-main > #footer { opacity: 0; }

/* 칸은 2.31초에 다 찬다. 0.3초 쉬고, 두 띠가 화면 밖에서 들어온다.
   10px 만 움직이면 그냥 나타난 걸로 보인다 — 제 높이만큼 통째로 민다. */
html.is-booted #wrap.l-main > #header {
  animation: shell-drop .62s cubic-bezier(.16, 1, .3, 1) 1.1s backwards;
}

html.is-booted #wrap.l-main > #footer {
  animation: shell-rise .62s cubic-bezier(.16, 1, .3, 1) 1.15s backwards;
}

/* 띠가 자리를 잡고 나서 문의하기만 한 번 더 튄다 */
html.is-booted #wrap.l-main > #header .l-header-cta {
  animation: shell-pop .35s cubic-bezier(.22, 1.18, .36, 1) 1.52s backwards;
}

@keyframes shell-drop {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: none; }
}

@keyframes shell-rise {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: none; }
}

@keyframes shell-pop {
  from { opacity: 0; transform: scale(.82); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.is-booting #wrap.l-main > #header,
  html.is-booting #wrap.l-main > #footer { opacity: 1; }
  html.is-booted #wrap.l-main > #header,
  html.is-booted #wrap.l-main > #header .l-header-cta,
  html.is-booted #wrap.l-main > #footer { animation: none; }
}

/* ==========================================================
   배경 그라디언트 (Paper Shaders · Apache-2.0)

   첫 카드의 배경 한 장. 뼈대에서는 제 색으로 떠 있다가 내용이
   들어오면 1.8초에 걸쳐 옅어져 뒤로 물러난다.
   ========================================================== */

.fx-orbs {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--b-radius);
  overflow: hidden;
  pointer-events: none;
  /* 글이 묻히지 않을 만큼만 */
  opacity: .3;
  /* 뼈대에서 제 색으로 떠 있다가 내용이 들어오면 천천히 물러난다 */
  transition: opacity 1.8s cubic-bezier(.3, .7, .4, 1);
}

/* 카드 안에 들어온 뒤 — 글보다 뒤로.
   기존 규칙(.bento__cell--identity > *:not(.bento__orbs))이 자식을
   전부 relative 로 돌려놔서 position 을 여기서 다시 잡아야 한다 */
.bento__cell--identity > .fx-orbs {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--b-radius);
}
.bento__cell--identity > *:not(.fx-orbs) { position: relative; z-index: 1; }

/* 뼈대 동안에는 제 색 그대로. 이 칸만 회색이 아니다 */
html.is-booting .bento__cell--identity > .fx-orbs {
  opacity: 1;
  transition: none;
}

/* ==========================================================
   좁은 화면

   「한 화면에 다 들어온다」는 데스크탑에서만 지키는 약속이다.
   좁아지면 줄 높이를 창에 맞추지 않고 칸마다 제 높이를 준다.
   세로로 쌓이는 대신 칸 하나하나는 읽을 만한 크기를 지킨다.

   세 단으로 나눈다.
     1199 이하 — 줄 높이를 창에서 떼어낸다 (공통)
     900~1199  — 칸 배치는 데스크탑 그대로
     899 이하  — 한 칸씩 세로로 쌓는다
     767 이하  — 글자와 여백을 손가락 화면에 맞춘다

   파일 맨 뒤에 둔다 — 위의 규칙을 덮어야 한다.
   ========================================================== */

/* ---------- 공통 (~1199) ---------- */
@media (max-width: 1199px) {
  /* 본문 좌우 기준선을 .l-inner(20px)와 맞춘다 */
  #wrap.l-main .bento { padding: 14px 20px 20px; }

  .bento { --b-gap: 12px; padding: 0; }

  .bento__grid {
    /* 창 높이로 줄을 잡던 걸 끈다. 칸마다 제 높이를 쓴다 */
    grid-template-rows: none;
    grid-auto-rows: auto;
  }

  /* 두 줄을 차지하던 칸도 제 높이만 쓴다 */
  .bento__cell--identity,
  .bento__cell--ax,
  .bento__cell--refs,
  .bento__cell--ongoing,
  .bento__cell--fig,
  .bento__cell--clients { grid-row: auto; }

  #footer.bento-footer { width: calc(100% - 40px); }
}

/* ---------- 태블릿 가로 (900~1199) ----------
   칸 배치는 데스크탑 그대로 둔다. 1024 에서도 6/6, 7/5 가 읽힌다.
   바꾸는 건 높이뿐 */
@media (min-width: 900px) and (max-width: 1199px) {
  .bento__cell--identity { min-height: 230px; padding: 26px 24px; }
  .bento__cell--ax       { height: 230px; }
  .bento__cell--refs     { height: 200px; }
  .bento__cell--ongoing  { height: 200px; }
  .bento__cell--fig      { height: 130px; }
  .bento__cell--clients  { height: 130px; }

  .bento__lede { font-size: clamp(20px, 2.6vw, 26px); }
  .bento__cell--refs .l-featured-name { font-size: 24px; }
  .bento__fig-num { font-size: 34px; }
  .bento__cell--fig .bento__caption { font-size: 15px; }
}

/* ---------- 세로로 쌓는다 (~899) ----------
   900 아래로는 12칸을 그대로 쓰면 숫자 칸이 170px 까지 좁아져
   「수행 프로젝트」가 세 줄로 접힌다. 한 칸씩 쌓는다.

   숫자 넉 장만 둘씩 묶는다 — 네 개가 한 줄이면 글자를 읽을 수 없고,
   하나씩 쌓으면 같은 모양이 네 번 반복돼 지루하다 */
@media (max-width: 899px) {
  .bento__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 기본은 한 줄 통째로. 숫자 칸만 아래에서 반으로 줄인다 */
  .bento__cell { grid-column: 1 / -1; }

  .bento__cell--identity { min-height: 0; padding: 30px 28px 26px; }
  .bento__cell--ax       { height: 260px; }
  .bento__cell--refs     { height: 220px; padding: 0; }
  .bento__cell--ongoing  { height: 300px; }
  .bento__cell--fig      { grid-column: span 1; height: 130px; }
  .bento__cell--clients  { height: 140px; padding: 12px 0; }

  .bento__lede { font-size: clamp(21px, 3vw, 28px); }
}

/* ---------- 손가락 화면 (~767) ---------- */
@media (max-width: 767px) {
  #wrap.l-main .bento { padding: 12px 16px 18px; }

  .bento { --b-gap: 10px; }

  .bento__cell { padding: 18px; }

  .bento__cell--identity { padding: 26px 20px 22px; }
  .bento__cell--ax       { height: 200px; padding: 18px 20px; }
  .bento__cell--refs     { height: 148px; }
  .bento__cell--ongoing  { height: 280px; padding: 16px; }
  .bento__cell--fig      { height: 112px; padding: 14px 16px; }
  .bento__cell--clients  { height: 122px; padding: 10px 0; }

  /* 누구인가 — 끊어 둔 줄이 또 접히지 않을 크기로 잡는다.
     375 에서 첫 줄이 꼭 한 줄에 들어가는 값이 18px 언저리다 */
  .bento__lede { font-size: clamp(18px, 4.9vw, 24px); line-height: 1.45; }
  .bento__chips { gap: 6px; margin-top: 16px; }
  .bento__chips li { padding: 8px 14px; font-size: 13px; }

  /* MAX */
  .bento__ax-title { font-size: 16px; }
  .bento__ax-body { gap: 6px 12px; }
  .bento__ax-links { margin-left: 0; }
  .bento__ax-links a { font-size: 12px; }

  /* 레퍼런스 — 카드가 작아진 만큼 글자도 줄인다 */
  .bento__cell--refs .l-featured-info { left: 14px; width: 66%; }
  .bento__cell--refs .l-featured-label { margin-bottom: 5px; font-size: 11px; }
  .bento__cell--refs .l-featured-name { font-size: 19px; line-height: 1.22; }

  /* 운영 중 */
  .bento__ongoing a { padding: 18px 16px; }
  .bento__msg-head b { font-size: 15px; }
  .bento__msg-sub { margin-top: 7px; font-size: 12px; }

  /* 숫자 */
  .bento__fig-num { font-size: 30px; }
  .bento__fig-num span { font-size: 12px; }
  .bento__cell--fig .bento__caption { font-size: 13px; }

  /* 고객사 */
  .bento__logos li { height: 48px; padding: 0 16px; }
  .bento__logos img { height: 22px; }

  .bento__caption { padding-top: 8px; font-size: 11px; }
}

/* 손가락으로 쓰는 화면에서는 호버 연출을 끈다.
   터치는 '올려둔 상태'가 손을 떼도 남아 칸 하나만 떠 있게 된다 */
@media (hover: none) {
  .bento__cell:hover,
  .bento__chips li:hover,
  .bento__logos li:hover,
  .bento__ongoing li:hover { transform: none; box-shadow: none; }
  .bento__chips li:hover { background: rgba(156, 242, 242, .6); }
  .bento__cell--fig:hover::before { transform: scaleY(0); }
  .bento__cell--fig-lead:hover::before { transform: scaleY(1); }
  .bento__cell--fig:hover .bento__fig-num,
  .bento__cell--fig:hover .bento__caption { color: inherit; }
  .bento__cell--fig-lead:hover .bento__fig-num,
  .bento__cell--fig-lead:hover .bento__caption { color: #fff; }
}
