/* ========================================================================
   About Section + Business Tabs + Portfolio + Numbers
   ======================================================================== */
.about {
  background: var(--color-bg-light);
  color: var(--color-text-dark);
}

.about .section-desc { color: #555; }

.about .section-title { margin-bottom: 10px; }

.biz-unit-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #000;
  margin-bottom: 40px;
}

/* ------------------------------------------------------------------
   Business Tabs — 왼쪽 세로 탭 + 오른쪽 콘텐츠 패널
   ------------------------------------------------------------------ */
.biz-tabs {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  margin-bottom: 120px;
}

/* ---------- Tab list (왼쪽) ---------- */
.biz-tablist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 100px;
  align-self: start;
}

.biz-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 24px;
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--color-text-dark);
  text-align: left;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.biz-tab:hover {
  border-color: rgba(0, 87, 255, 0.4);
  transform: translateX(4px);
}

.biz-tab-label {
  flex: 1;
  min-width: 0;
}

.biz-tab-arrow {
  font-size: 14px;
  color: #999;
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.biz-tab:hover .biz-tab-arrow {
  opacity: 1;
  transform: translateX(0);
}

.biz-tab.is-active {
  /* 탭 자체가 다크 pill — 내부 accent 참조는 크림으로 로컬 전환 */
  --color-accent: #FBF2D9;
  background: var(--color-text-dark);
  color: var(--color-text-white);
  border-color: var(--color-text-dark);
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.4);
}
.biz-tab.is-active .biz-tab-arrow {
  color: var(--color-accent);
  opacity: 1;
  transform: translateX(0);
}

.biz-tab:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---------- Panels (오른쪽) ---------- */
.biz-panels {
  position: relative;
  min-height: 420px;
}

.biz-panel {
  padding: 48px 48px 40px;
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  box-shadow: 0 20px 60px -40px rgba(0, 0, 0, 0.2);
  animation: bizPanelIn 0.45s var(--ease-out);
}

.biz-panel[hidden] { display: none; }

@keyframes bizPanelIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.biz-panel-head {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.biz-panel-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.biz-panel-title {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  color: var(--color-text-dark);
  margin-bottom: 12px;
}

.biz-panel-lead {
  max-width: 720px;
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -0.3px;
  color: var(--color-text-dark);
}

/* ---------- Panel blocks ---------- */
.biz-block {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.biz-block:last-child { border-bottom: 0; }

.biz-kicker {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #111;
  padding-top: 2px;
}

.biz-block-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.biz-block-title {
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 800;
  line-height: 1.5;
  color: var(--color-text-dark);
  letter-spacing: -0.3px;
}

.biz-block-body {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.7;
  color: var(--color-text-dark);
}

.biz-list-detail {
  display: inline-block;
  margin-left: 8px;
  font-size: 13px;
  color: #888;
  font-weight: 500;
}

.biz-cases {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.biz-case-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.biz-case-title {
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 800;
  color: var(--color-text-dark);
  letter-spacing: -0.2px;
}

.biz-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.biz-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text-dark);
}

.biz-list li::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 0;
  width: 8px;
  height: 2px;
  background: var(--color-accent);
}

.biz-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 10px 18px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-accent);
}

.biz-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  animation: bizStatusPulse 1.6s ease-in-out infinite;
}

@keyframes bizStatusPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.05); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .biz-tabs {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* 모바일: iOS 스타일 segmented control — 3개 탭 모두 시각적으로 균등 */
  .biz-tablist {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    align-self: stretch;
    gap: 0;
    padding: 4px;
    background: #ececee;
    border: none;
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
  }

  .biz-tab {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 40px;
    justify-content: center;
    align-items: center;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: #333;
    background: transparent;
    border: none;
    border-radius: 8px;
    box-shadow: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    transition:
      background var(--dur-fast) var(--ease-out),
      color var(--dur-fast) var(--ease-out),
      box-shadow var(--dur-fast) var(--ease-out);
  }
  .biz-tab:hover {
    transform: none;
    border-color: transparent;
  }

  .biz-tab-label {
    flex: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }
  .biz-tab-arrow { display: none; }

  .biz-tab.is-active {
    background: #ffffff;
    color: var(--color-text-dark);
    border-color: transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.05);
  }

  /* 패널들을 좌우 스와이프 슬라이더로 */
  .biz-panels {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    min-height: 0;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(var(--container-pad) * -1);
    padding: 2px var(--container-pad) 12px;
    scroll-padding-inline: var(--container-pad);
    scroll-behavior: smooth;
  }
  .biz-panels::-webkit-scrollbar { display: none; }

  /* hidden 속성 무시하고 모든 패널을 슬라이드로 펼침 */
  .biz-panel,
  .biz-panel[hidden] {
    display: block;
    flex: 0 0 100%;
    max-width: 100%;
    scroll-snap-align: start;
    animation: none;            /* 스와이프 시 애니 뭉침 방지 */
    padding: 32px 24px;
    border-radius: 12px;
  }

  .biz-panel-head { padding-bottom: 20px; margin-bottom: 20px; }
  .biz-block { grid-template-columns: 1fr; gap: 8px; padding: 16px 0; }
  .biz-kicker { padding-top: 0; }
}

@media (max-width: 480px) {
  .biz-tab {
    font-size: 12px;
    letter-spacing: -0.3px;
    padding: 8px 6px;
    min-height: 38px;
  }
  .biz-panel { padding: 26px 18px; }
  .biz-panel-title { font-size: 28px; }
}

/* ------------------------------------------------------------------
   Portfolio
   ------------------------------------------------------------------ */
.portfolio-head {
  margin-top: 40px;
  margin-bottom: 48px;
}

.portfolio-title {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.4px;
  color: var(--color-text-dark);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  background: #fff;
  transition: transform var(--dur-base) var(--ease-out);
}
.portfolio-item:hover { transform: translateY(-4px); }

/*
  썸네일 — padding-top 75%로 정확한 4:3 고정.
  padding은 요소의 content-box 너비(= 카드 너비) 기준으로 계산되므로
  grid/flex 컨텍스트에 영향받지 않고 모든 카드가 동일 높이.
*/
.portfolio-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding-top: 75%;
  aspect-ratio: auto;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform-origin: center;
  transition: transform var(--dur-slow) var(--ease-out);
}
.portfolio-item:hover .portfolio-thumb { transform: scale(1.06); }

.portfolio-info {
  padding: 20px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portfolio-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
}

.portfolio-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 모바일: 포트폴리오를 좌우 슬라이드 (다음 카드 살짝 보이는 peek) */
@media (max-width: 640px) {
  .portfolio-grid {
    display: flex;
    align-items: flex-start;
    grid-template-columns: none;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(var(--container-pad) * -1);
    padding: 4px var(--container-pad) 20px;
    scroll-padding-left: var(--container-pad);
  }
  .portfolio-grid::-webkit-scrollbar { display: none; }

  .portfolio-item {
    flex: 0 0 78%;
    max-width: 78%;
    align-self: flex-start;
    scroll-snap-align: start;
    /* display/flex 구조는 base (display:block) 그대로 유지 — 자식은 자연 스택 */
  }
  .portfolio-item:hover { transform: none; }
  .portfolio-item:last-child {
    margin-right: calc(var(--container-pad) - 14px);
  }

  /* 썸네일 비율은 base의 padding-top: 75% 를 그대로 사용 (모바일에서 재정의 X) */

  .portfolio-info {
    padding: 14px 2px 4px;
  }
}
