/* ===========================
   references.css — web-renewal references/page.tsx 이식
   인라인 스타일 + StatsSection을 순수 CSS 클래스로 추출.
   base.html의 <main class="max-w-6xl ..."> 래퍼를 풀블리드로 무력화한다.
   전역 클래스(.section-*, .btn-pill, .r-*)는 renewal.css를 재사용.
   =========================== */

/* ── base.html의 main 래퍼(max-w-6xl + 패딩)를 풀블리드로 해제 ──
   리뉴얼 섹션은 1440px 중앙정렬 + 풀폭 배경이라 main 제약을 풀어야 한다. */
.ref-page {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
/* main 자체의 상하 패딩 제거(섹션이 자체 패딩을 가짐) */
main:has(> .ref-page) {
  padding-top: 0;
  padding-bottom: 0;
  max-width: none;
}

.ref-page * {
  box-sizing: border-box;
}

.ref-wrap {
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Hero ── */
.ref-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #D33500 0%, #962500 100%);
  min-height: 480px;
}
.ref-hero__inner {
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 100px 24px;
}
.ref-hero__head {
  display: flex;
  flex-direction: column;
  gap: 21px;
}
.ref-hero__title {
  font-size: 80px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 92px;
  margin: 0;
}
.ref-hero__sub {
  font-size: 20px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  line-height: 33px;
  margin: 0;
  white-space: pre-line;
}
.ref-hero__vector {
  position: absolute;
  right: -30px;
  top: 30px;
  width: 738px;
  height: 510px;
  pointer-events: none;
  z-index: 1;
}
.ref-hero__rect-wrap {
  position: absolute;
  right: -51px;
  top: 50%;
  transform: translateY(-50%);
  width: 890px;
  height: 686px;
  mix-blend-mode: plus-lighter;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}
.ref-hero__rect {
  width: 686px;
  height: 890px;
  transform: rotate(90deg);
  flex-shrink: 0;
}
.ref-hero__group {
  position: absolute;
  right: 156px;
  top: 24px;
  width: 563px;
  height: 384px;
  pointer-events: none;
  z-index: 1;
}

/* ===========================
   Stats (Our Clients) — StatsSection.tsx 이식
   =========================== */
.ref-stats {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #fff;
}
.ref-stats__blob {
  position: absolute;
  left: 0;
  top: 100px;
  width: 100%;
  height: 1181px;
  object-fit: fill;
  pointer-events: none;
}
.ref-stats__container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 100px 24px 0;
  position: relative;
}
.ref-stats__header {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 66px;
}
.ref-stats__cards {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 24px;
  height: 356px;
}
.ref-stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 0.85px solid rgba(255, 121, 0, 0.5);
  box-shadow: 0px 7px 27.3px 0px rgba(255, 121, 0, 0.3);
  background-image: linear-gradient(0deg, rgb(255, 82, 44) 7.46%, rgb(255, 121, 0) 100%);
}
.ref-stat-card--col {
  flex: 1;
  min-width: 0;
}
.ref-stats__right {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 615px;
  gap: 24px;
}
.ref-stat-card--row {
  flex: 1;
  min-height: 0;
  width: 100%;
}
.ref-stat-card__overlay {
  position: absolute;
  width: 100vw;
  max-width: none;
  height: 1181px;
  object-fit: fill;
  pointer-events: none;
  top: -146px;
}
.ref-stat-card__overlay--1 { left: calc(-1 * max(0px, (100vw - 1440px) / 2)); }
.ref-stat-card__overlay--2 { left: calc(-1 * (max(0px, (100vw - 1440px) / 2) + 412.5px)); }
.ref-stat-card__overlay--3 { left: calc(-1 * (max(0px, (100vw - 1440px) / 2) + 825px)); }
.ref-stat-card__overlay--4 { left: calc(-1 * (max(0px, (100vw - 1440px) / 2) + 825px)); top: -336px; }

.ref-stat-card__title {
  position: absolute;
  left: 30.15px;
  top: 20.15px;
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  line-height: 63.6px;
  white-space: nowrap;
  margin: 0;
  font-family: 'Pretendard', sans-serif;
}
.ref-stat-card__title--multiline {
  top: 27.15px;
  line-height: 45px;
  white-space: pre-line;
}
.ref-stat-card__num {
  position: absolute;
  right: 27.65px;
  bottom: 37.15px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  filter: drop-shadow(0px 9px 12px #ff522c);
}
.ref-stat-card__num--baseline {
  right: 28.15px;
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
  align-items: baseline;
}
.ref-stat-card__num--gap { gap: 9px; }
.ref-stat-card__num-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 128px;
  width: 203px;
  flex-shrink: 0;
}
.ref-stat-card__num-unit-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
}
.ref-stat-xl {
  font-size: 155px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -3.1px;
  line-height: 155px;
  font-family: 'Pretendard', sans-serif;
}
.ref-stat-lg {
  font-size: 112px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -2.24px;
  line-height: 1;
  font-family: 'Pretendard', sans-serif;
}
.ref-stat-md {
  font-size: 79.5px;
  font-weight: 600;
  color: #FFD0A1;
  line-height: 63.6px;
  font-family: 'Pretendard', sans-serif;
}
.ref-stat-md--unit { line-height: 1; }
.ref-stat-md--small { font-size: 66.5px; line-height: 1; }

/* 파트너 로고 무한 스크롤 */
.ref-partners {
  position: relative;
  z-index: 10;
  padding: 58px 0 60px;
}
.ref-partners__dissolve {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 10;
  pointer-events: none;
  width: calc(max(0px, (100vw - 1440px) / 4));
}
.ref-partners__dissolve--left {
  left: 0;
  background: linear-gradient(90deg, rgb(255, 245, 235) 0%, rgba(255, 245, 235, 0) 100%);
}
.ref-partners__dissolve--right {
  right: 0;
  background: linear-gradient(270deg, rgb(255, 245, 235) 0%, rgba(255, 245, 235, 0) 100%);
}
.ref-partners__rows {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ref-partners__row {
  display: flex;
  animation: refScrollLogos 80s linear infinite;
}
.ref-partners__row--delay { animation-delay: -13s; }
.ref-partner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 80px;
  padding: 0 32px;
  margin-right: 20px;
  border-radius: 12px;
  background: #fff;
  border: 0.854px solid #D8DCEC;
}
.ref-partner img {
  height: 40px;
  width: auto;
  max-width: none;
  object-fit: contain;
}
@keyframes refScrollLogos {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% / 3)); }
}

/* ===========================
   Browse All Cases (filter)
   =========================== */
.ref-browse {
  background: #fff;
}
.ref-browse__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 130px 24px 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
}
.ref-browse__title {
  text-align: center;
  word-break: keep-all;
}
.ref-browse__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.ref-browse__description {
  margin: 0;
  color: #686868;
  font-size: 18px;
  font-weight: 500;
  line-height: 30px;
  word-break: keep-all;
}
.ref-filter {
  width: 100%;
  border: 0.88px solid #C7CBCE;
  border-radius: 14px;
  padding: 16px 51px;
  background: #fff;
}
.ref-filter__row {
  display: flex;
  align-items: center;
  gap: 43px;
  padding: 8px 0;
}
.ref-filter__row--border {
  border-bottom: 1px solid #C7CBCE;
}
.ref-filter__label {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  letter-spacing: -0.8px;
  line-height: 52px;
  flex-shrink: 0;
}
.ref-filter__opts {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.ref-filter__opt {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 0 10px;
  height: 35px;
  background: none;
  border: none;
  cursor: pointer;
}
.ref-filter__check {
  width: 14px;
  height: 14px;
  border: 1.25px solid #686868;
  border-radius: 2px;
  background: #fff;
  transition: background 0.15s;
  flex-shrink: 0;
}
.ref-filter__opt.is-active .ref-filter__check {
  background: #0D1B3E;
}
.ref-filter__opt-label {
  font-size: 18px;
  font-weight: 500;
  color: #686868;
  letter-spacing: -0.8px;
  line-height: 52px;
}

/* 선택된 필터 칩 */
.ref-chips {
  display: flex;
  gap: 13px;
  align-self: flex-start;
  flex-wrap: wrap;
}
.ref-chips:empty { display: none; }
.ref-chip {
  display: flex;
  gap: 7px;
  align-items: center;
}
.ref-chip span {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.ref-chip img { width: 10px; height: 10px; }

/* 사례 그리드 */
.ref-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 15px;
}
.ref-card {
  border: 0.88px solid #C7CBCE;
  border-radius: 14px;
  padding: 32px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.ref-card.is-hidden { display: none; }
.ref-card__tags {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ref-card__tag {
  background: #0D1B3E;
  border-radius: 22px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 22px;
}
.ref-card__tag--size {
  background: #FF7900;
}
.ref-card__tag--outline {
  background: #fff;
  border: 1px solid rgba(13, 27, 62, 0.3);
  color: #0D1B3E;
}
.ref-card__tag--format {
  border: 1px solid #FFD5B8;
  background: #FFF1E8;
  color: #C84E00;
}
.ref-card__title {
  font-size: 28px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.48px;
  line-height: 35px;
  margin: 0;
  white-space: pre-line;
  word-break: keep-all;
}
.ref-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background: #F0F2F5;
}
.ref-card__image,
.ref-card__image-placeholder {
  width: 100%;
  height: 100%;
}
.ref-card__image {
  display: block;
  object-fit: cover;
}
.ref-card__image-placeholder {
  background: linear-gradient(135deg, #EEF1F7 0%, #DDE3EE 100%);
}
.ref-card__best {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  padding: 7px 13px;
  border-radius: 999px;
  background: #FF7900;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
}
.ref-card__summary {
  min-height: 52px;
  margin: 0;
  color: #686868;
  font-size: 16px;
  font-weight: 500;
  line-height: 26px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.ref-card__meta {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  padding-top: 14px;
  border-top: 1px solid #E1E3E8;
}
.ref-card__meta-row {
  margin: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 27px;
}
.ref-card__meta-row dt,
.ref-card__meta-row dd {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}
.ref-card__meta-row dt {
  width: 52px;
  flex: 0 0 52px;
  color: #686868;
  font-weight: 500;
  white-space: nowrap;
}
.ref-card__meta-row dt::after {
  content: "-";
  margin-left: 7px;
}
.ref-card__meta-row dd {
  color: #2A2A2A;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ref-card__meta-row--strong dd {
  color: #0D1B3E;
  font-weight: 700;
}

.ref-empty {
  width: 100%;
  text-align: center;
  padding: 60px 0;
  color: #686868;
  font-size: 18px;
}
.ref-empty.is-hidden { display: none; }
.ref-empty--initial {
  border: 1px dashed #C7CBCE;
  border-radius: 16px;
  background: #F7F8FA;
}

/* ===========================
   Consulting / Development CTA
   =========================== */
.ref-cta2 {
  background: #1B1B1B;
}
.ref-cta2__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 100px 24px 130px;
  display: flex;
  flex-direction: column;
  gap: 50px;
}
.ref-cta2__title {
  color: #fff;
}
.ref-cta2__cards {
  display: flex;
  gap: 24px;
  height: 359px;
}
.ref-cta2-card {
  flex: 1;
  border-radius: 13px;
  border: 1px solid #fff;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  display: block;
}
.ref-cta2-card__bg-color {
  position: absolute;
  inset: 0;
}
.ref-cta2-card--consult .ref-cta2-card__bg-color { background: #ABAAFF; }
.ref-cta2-card--dev .ref-cta2-card__bg-color { background: #9ACDFF; }
.ref-cta2-card__bg-img {
  position: absolute;
  width: 100%;
  object-fit: cover;
}
.ref-cta2-card--consult .ref-cta2-card__bg-img {
  inset: -6% 0;
  height: 112%;
}
.ref-cta2-card--dev .ref-cta2-card__bg-img {
  inset: -1% 0;
  height: 102%;
}
.ref-cta2-card__overlay {
  position: absolute;
  inset: 0;
}
.ref-cta2-card--consult .ref-cta2-card__overlay {
  background: linear-gradient(180deg, rgba(68, 0, 255, 0.8) 0%, rgba(68, 0, 255, 0.56) 50%, rgba(36, 0, 134, 0.8) 100%);
}
.ref-cta2-card--dev .ref-cta2-card__overlay {
  background: linear-gradient(180deg, rgba(0, 128, 255, 0.8) 0%, rgba(0, 128, 255, 0.56) 50%, rgba(0, 84, 167, 0.8) 100%);
}
.ref-cta2-card__content {
  position: absolute;
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 80px;
  z-index: 1;
}
.ref-cta2-card__head {
  display: flex;
  flex-direction: column;
  gap: 35px;
}
.ref-cta2-card__kicker {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.8px;
  line-height: 52px;
}
.ref-cta2-card__heading {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.8px;
  line-height: 52px;
}
.ref-cta2-card__more {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 36px;
}

/* ===========================
   Final CTA
   =========================== */
.ref-cta {
  background: linear-gradient(180deg, #D33500 0%, #962500 100%);
  padding: 100px 0;
}
.ref-cta__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 27px;
  align-items: center;
}
.ref-cta__head {
  display: flex;
  flex-direction: column;
  gap: 11px;
  align-items: center;
}
.ref-cta__title {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.8px;
  margin: 0;
  text-align: center;
}
.ref-cta__sub {
  font-size: 17.6px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  text-align: center;
}
.ref-cta__btn {
  background: #fff;
  border-radius: 10px;
  padding: 22px 52px;
  box-shadow: 0px 12px 16px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  display: inline-block;
}
.ref-cta__btn span {
  font-size: 17.6px;
  font-weight: 700;
  color: #FF7900;
}

/* ===========================
   모바일 반응형 (renewal.css의 r-* 유틸과 함께 동작)
   =========================== */
@media (max-width: 1488px) {
  .ref-hero__inner,
  .ref-stats__container,
  .ref-browse__inner,
  .ref-cta2__inner {
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
  }
}

@media (max-width: 767px) {
  .ref-hero { min-height: 0; }
  .ref-hero__inner { padding: 60px 24px; }
  .ref-hero__title { font-size: 36px; line-height: 44px; letter-spacing: -0.8px; }
  .ref-hero__sub { font-size: 16px; line-height: 26px; }
  .ref-hero__vector,
  .ref-hero__rect-wrap,
  .ref-hero__group { display: none; }

  .ref-stats__container { padding: 60px 24px 0; }
  .ref-stats__header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ref-stats__cards { flex-direction: column; height: auto; gap: 24px; }
  .ref-stats__right { width: 100%; }
  .ref-stat-card { min-height: 140px; }
  .ref-stat-card__overlay { display: none; }
  .ref-stat-xl { font-size: 80px; line-height: 90px; }
  .ref-stat-lg { font-size: 60px; line-height: 70px; }
  .ref-stat-md { font-size: 40px; line-height: 50px; }
  .ref-stat-md--small { font-size: 40px; }
  .ref-stat-card__num-box { width: auto; height: auto; }

  .ref-browse__inner { padding: 60px 24px; }
  .ref-browse__title { font-size: 30px; line-height: 40px; }
  .ref-browse__description { font-size: 16px; line-height: 26px; }
  .ref-filter { padding: 16px 20px; }
  .ref-filter__row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ref-grid { grid-template-columns: 1fr; }
  .ref-card { padding: 24px 20px; gap: 18px; }
  .ref-card__title { font-size: 24px; line-height: 32px; }
  .ref-card__summary { min-height: 0; }

  .ref-cta2__inner { padding: 60px 24px; }
  .ref-cta2__cards { flex-direction: column; height: auto; }
  .ref-cta2-card { min-height: 280px; }
  .ref-cta2-card__content {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    padding: 32px 24px;
    gap: 32px;
  }
  .ref-cta2-card__kicker { font-size: 28px; }
  .ref-cta2-card__heading { font-size: 32px; line-height: 40px; }

  .ref-cta { padding: 60px 24px; }
  .ref-cta__title { font-size: 28px; line-height: 36px; }
}

@media (min-width: 768px) and (max-height: 900px) {
  .ref-hero { min-height: 440px; }
  .ref-hero__inner { padding-top: 80px; padding-bottom: 80px; }
}
