/* =========================================================
   HOME
   ========================================================= */

/* ---------- 1. Hero ---------- */
/* 배경 영상(hero-video.js) 위에 카피. 영상 위라 글자는 흰색, 왼쪽을 어둡게 덮어 대비를 맞춘다 */
/* isolation 으로 쌓임 맥락을 만들면 안에 든 고정 헤더(z-index 40)가 히어로 층에 갇혀,
   아래 position 이 있는 섹션(.stats-band)이 헤더를 덮는다. 영상(0) · 카피(1) 순서는 z-index 로만 정한다 */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(100svh, 880px);
  padding-top: var(--header-height); /* 고정 헤더 자리. 영상도 이 아래에서 시작한다 */
  /* 헤더 자리는 흰색: 스크롤 직후 반투명 바 뒤로 잉크색이 비치지 않게 */
  background: linear-gradient(var(--color-bg) var(--header-height), var(--color-ink) 0);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: var(--header-height) 0 0;
  z-index: 0;
}
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 19, 40, 0.84) 0%, rgba(14, 19, 40, 0.62) 45%, rgba(14, 19, 40, 0.1) 80%),
    linear-gradient(0deg, rgba(14, 19, 40, 0.5) 0%, rgba(14, 19, 40, 0) 30%);
}
.hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 글자색은 카피 · 컨트롤에만. .hero 에 주면 안에 든 헤더 메뉴까지 흰색이 된다 */
.hero__body,
.hero__controls {
  position: relative;
  z-index: 1;
  color: #fff;
}
.hero__body {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: 64px 48px;
}

.hero__copy {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}
.hero__eyebrow::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-hero-accent);
}

/* 회전 단어: 4개 단어가 같은 자리에서 차례로 올라왔다 사라진다 (9.2s 주기) */
.hero__words {
  position: relative;
  display: block;
  height: calc(var(--lh-display) * 1em);
}
.hero__word {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  color: var(--color-hero-accent);
  opacity: 0;
  animation: hero-word 9.2s linear infinite;
}
.hero__word:nth-child(1) {
  animation-delay: -0.35s;
}
.hero__word:nth-child(2) {
  animation-delay: 1.95s;
}
.hero__word:nth-child(3) {
  animation-delay: 4.25s;
}
.hero__word:nth-child(4) {
  animation-delay: 6.55s;
}
@keyframes hero-word {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  4%,
  24% {
    opacity: 1;
    transform: none;
  }
  28%,
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero__word {
    animation: none;
  }
  .hero__word:first-child {
    opacity: 1;
  }
}

.hero__lead {
  max-width: 430px;
  color: rgba(255, 255, 255, 0.86);
}

/* 영상 멈춤 · 재생: 히어로 왼쪽 아래 구석 */
.hero__controls {
  position: absolute;
  left: 24px;
  bottom: 24px;
}
.hero__ctrl {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}
.hero__ctrl:hover {
  background: rgba(255, 255, 255, 0.22);
}
.hero__icon-play,
.hero.is-paused .hero__icon-pause {
  display: none;
}
.hero.is-paused .hero__icon-play {
  display: block;
}

@media (max-width: 1023px) {
  /* 카피가 가운데로 오는 구간: 영상 전체를 고르게 어둡게 */
  .hero__media::after {
    background: rgba(14, 19, 40, 0.58);
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: min(100svh, 720px);
  }
  /* 세로 화면은 가로 영상 가운데만 보인다. 첫 장면 트럭이 오른쪽에 있어 초점을 살짝 오른쪽으로 */
  .hero__video {
    object-position: 65% 50%;
  }
  .hero__body {
    padding-block: 32px 32px;
  }
  .hero__copy {
    gap: 20px;
  }
  .hero__controls {
    left: 16px;
    bottom: 16px;
  }
}

/* ---------- 2. Stats (중앙 타이틀 + 숫자 3열) ---------- */
.stats-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--color-bg);
}
/* 섹션 전체에 불규칙하게 흩어진 파스텔 블루 빛. 크기·위치·진하기를 제각각 두어 랜덤한 느낌을 낸다.
   위·아래 끝은 흰 배경으로 자연스럽게 사라진다 */
.stats-band::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 -10%;
  background:
    radial-gradient(22% 30% at 8% 22%, rgba(110, 200, 255, 0.22), transparent 70%),
    radial-gradient(18% 26% at 34% 12%, rgba(150, 130, 255, 0.14), transparent 70%),
    radial-gradient(26% 34% at 88% 18%, rgba(47, 107, 255, 0.16), transparent 70%),
    radial-gradient(20% 30% at 64% 42%, rgba(110, 200, 255, 0.18), transparent 70%),
    radial-gradient(24% 32% at 18% 62%, rgba(47, 107, 255, 0.18), transparent 70%),
    radial-gradient(18% 24% at 46% 80%, rgba(150, 130, 255, 0.16), transparent 70%),
    radial-gradient(24% 34% at 92% 72%, rgba(110, 200, 255, 0.22), transparent 70%);
  filter: blur(48px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 82%, transparent 100%);
  pointer-events: none;
}
.stats-band__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  padding-block: var(--section-space);
  text-align: center;
}
/* 다음 섹션도 흰 배경이라 여백이 두 배로 겹치지 않게 절반만 둔다 */
.stats-band + .section {
  padding-top: calc(var(--section-space) / 2);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  width: 100%;
  max-width: 960px;
}
.stats__label {
  margin-bottom: 12px;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}
.stats__num {
  font: 800 var(--fs-stat) / 1 var(--font-display);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stats__unit {
  margin-left: 4px;
  font: 700 20px var(--font-body);
}
/* "100+건"의 +는 숫자 옆에서 눈에 띄게 숫자의 약 70% 크기로 */
.stats__plus {
  margin-left: 0.04em;
  font-size: 0.7em;
  vertical-align: 0.28em;
}

@media (max-width: 767px) {
  .stats-band__inner {
    gap: 36px;
  }
  .stats {
    gap: 12px;
  }
  .stats__label {
    font-size: 13px;
  }
  .stats__unit {
    font-size: 15px;
    margin-left: 2px;
  }
}

/* ---------- 3. Services (왼쪽 목록 탭 · 오른쪽 상세) ---------- */
/* 탭은 service-tabs.js 로 전환. 선택된 서비스만 오른쪽 패널에 보인다 */
.services {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); /* 왼쪽 목록 : 오른쪽 상세 = 3 : 7 */
  align-items: start;
  gap: 48px 72px;
  overflow-x: clip; /* 크게 키운 차량 이미지의 투명 여백이 가로 스크롤을 만들지 않게 */
}

.services__aside {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
/* 섹션 제목: 목록·상세 위 전체 폭, 가운데 정렬 */
.services__head {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.service-tabs {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-line);
}
.service-tab {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  font: 700 18px / 1.3 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--color-text-muted);
  transition: background 0.3s ease, color 0.3s ease, border-radius 0.3s ease;
}
.service-tab::after {
  content: '→';
  margin-left: auto;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--transition-fast) ease, transform var(--transition-fast) var(--ease-out);
}
.service-tab:hover {
  color: var(--color-text);
}
.service-tab__num {
  flex: none;
  width: 24px;
  font: 400 var(--fs-caption) var(--font-body);
  color: var(--color-text-muted);
}
.service-tab[aria-selected='true'] {
  background: var(--color-ink);
  border-color: transparent;
  border-radius: var(--radius-md);
  color: #fff;
}
.service-tab[aria-selected='true'] .service-tab__num {
  color: #8fb0ff;
}
.service-tab[aria-selected='true']::after {
  opacity: 1;
  transform: none;
}

/* 상세 패널: 왼쪽 설명 + 오른쪽 블루 박스. 차량은 박스 왼쪽 밖으로 튀어나온다 */
.service-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start; /* 탭마다 설명 길이가 달라도 제목이 항상 같은 높이에서 시작하게 위쪽 정렬 */
  gap: 32px;
}
.service-panel__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.service-panel__num {
  display: none;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--color-blue-strong);
}
.service-panel__num span {
  font-weight: 400;
  color: var(--color-text-muted);
}
.service-panel__title {
  font-size: clamp(28px, 2.6vw, 34px);
}
.service-panel__sub {
  font-size: var(--fs-lead);
  color: var(--color-text-body);
}
.service-panel__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 14px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--color-line);
  font-size: var(--fs-small);
  line-height: 1.6;
}
/* 라벨과 값을 줄로 나눈다: 라벨 위 · 값 아래 */
.service-panel__info div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.service-panel__info dt {
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
}
.service-panel__info dd {
  margin: 0;
  color: var(--color-text-body);
}
/* 자세히 보기: 블루 박스 오른쪽 아래 모서리에 걸쳐 떠 있는 흰 알약 버튼 (절반은 박스 밖으로 내려옴).
   차량 바퀴와 겹치지 않고, 탭마다 설명 길이가 달라도 위치가 바뀌지 않으며 탭 전환 애니메이션에도 끼지 않는다 */
.service-panel__more {
  position: absolute;
  right: 28px;
  bottom: -22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #fff;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--color-text);
  box-shadow:
    0 2px 6px -2px rgba(47, 107, 255, 0.18),
    0 18px 30px -14px rgba(47, 107, 255, 0.45);
  animation: service-float 4s ease-in-out infinite;
  transition: background var(--transition-fast) ease, color var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
}
.service-panel__more:hover {
  background: var(--color-blue-strong);
  color: #fff;
  box-shadow:
    0 2px 6px -2px rgba(47, 107, 255, 0.3),
    0 24px 36px -14px rgba(47, 107, 255, 0.6);
}
@keyframes service-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .service-panel__more {
    animation: none;
  }
}

.service-panel__media {
  position: relative;
  height: 360px;
  margin-left: 56px; /* 튀어나온 차량 자리 */
  border-radius: 28px;
  background: var(--gradient-vehicle);
  /* 같은 블루 계열 그림자로 박스가 떠 보이게. 옆으로 번지는 폭을 작게 둬서 .services 의 overflow-x: clip 에 잘리지 않게 한다 */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 28px -20px rgba(47, 107, 255, 0.35),
    0 40px 56px -44px rgba(47, 107, 255, 0.55);
}
/* 차량 이미지는 같은 캔버스(839×479). 기본 폭은 박스보다 넓게(왼쪽 80px 튀어나옴 · 오른쪽 24px 넘침)
   차량별 크기는 --vehicle-scale 로 조정한다. 바닥선은 그대로 두고 가운데 기준으로 커지거나 작아진다 */
.service-panel__media {
  --vehicle-w: calc(100% + 104px);
  --vehicle-left: -80px;
  --vehicle-scale: 1;
}
.service-panel__media--bike {
  --vehicle-scale: 1.4;
}
.service-panel__media--truck {
  --vehicle-scale: 0.85;
}
.service-panel__media img {
  position: absolute;
  left: calc(var(--vehicle-left) - var(--vehicle-w) * (var(--vehicle-scale) - 1) / 2);
  bottom: 40px;
  width: calc(var(--vehicle-w) * var(--vehicle-scale));
  max-width: none;
  height: auto;
  filter: drop-shadow(0 18px 18px rgba(30, 60, 150, 0.2));
}

/* 연계배송: 차량 사진 대신 운송 수단별 소요시간 카드. 차량처럼 박스 왼쪽 밖으로 튀어나온다 */
.service-panel__media--routes {
  display: flex;
  align-items: flex-end;
  padding-bottom: 40px;
}
.link-routes {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% + 32px);
  margin-left: -56px;
}
.link-routes li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 16px;
  padding: 16px 20px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 32px -18px rgba(20, 25, 46, 0.3);
}
.link-routes li:nth-child(2) {
  margin-left: 28px; /* 카드를 계단식으로 어긋나게 */
}
.link-routes__mode {
  font: 700 16px / 1.3 var(--font-display);
  letter-spacing: -0.02em;
}
.link-routes__area {
  grid-row: 2;
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
}
.link-routes__time {
  grid-row: 1 / 3;
  grid-column: 2;
  font: 800 18px / 1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--color-blue-strong);
}

/* 탭 전환 시 설명은 살짝 올라오고, 차량은 오른쪽에서 들어온다 */
.service-panel.is-entering .service-panel__body {
  animation: service-rise 0.5s var(--ease-out) both;
}
.service-panel.is-entering .service-panel__media img,
.service-panel.is-entering .link-routes li {
  animation: service-drive 0.7s var(--ease-out) both;
}
.service-panel.is-entering .link-routes li:nth-child(2) {
  animation-delay: 0.08s;
}
.service-panel.is-entering .link-routes li:nth-child(3) {
  animation-delay: 0.16s;
}
@keyframes service-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes service-drive {
  from {
    opacity: 0;
    transform: translateX(48px);
  }
}

@media (max-width: 1023px) {
  .services {
    grid-template-columns: minmax(0, 1fr);
  }
  .service-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border-top: 0;
  }
  .service-tab {
    padding: 14px 16px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    font-size: 16px;
  }
  .service-tab::after {
    display: none;
  }
  .service-panel__media {
    height: 320px;
  }
}

@media (max-width: 767px) {
  .service-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px; /* 박스 아래로 걸친 버튼 자리 */
    min-height: 0;
  }
  .service-tab {
    gap: 10px;
    padding: 13px 12px;
    font-size: 15px;
  }
  .service-tab__num {
    width: 18px;
  }
  .service-panel__media {
    order: -1; /* 차량 박스를 설명 위로 */
    height: 240px;
    margin-left: 28px;
    border-radius: var(--radius-lg);
  }
  .service-panel__media {
    --vehicle-w: calc(100% + 40px);
    --vehicle-left: -28px;
  }
  .service-panel__media img {
    bottom: 20px;
  }
  .service-panel__media--routes {
    height: auto;
    padding: 72px 16px 20px 0;
  }
  .link-routes {
    width: calc(100% + 28px);
    margin-left: -28px;
  }
  .link-routes li {
    padding: 14px 16px;
  }
  .link-routes li:nth-child(2) {
    margin-left: 16px;
  }
  .link-routes__time {
    font-size: 16px;
  }
  .service-panel__sub {
    font-size: var(--fs-body);
  }
  .service-panel__more {
    right: 16px;
    bottom: -18px;
    padding: 9px 16px;
    font-size: 14px;
  }
}

/* 차량 추천 안내 줄: 서비스 섹션 맨 아래(목록·상세 아래 전체 폭), 차량 추천받기 페이지로 연결
   위 차량 이미지(블루 박스)가 주인공이라 흰 바탕 + 은은한 그림자로 한 단계 낮춰 보조 정보처럼 보이게 */
.services__recommend {
  grid-column: 1 / -1;
  margin-top: 24px; /* 블루 박스 아래로 걸친 '자세히 보기' 버튼과 붙지 않게 */
}
.recommend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 20px 28px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px -22px rgba(20, 25, 46, 0.18);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.recommend-bar:hover {
  border-color: var(--color-border);
  box-shadow: 0 16px 36px -20px rgba(20, 25, 46, 0.24);
}
.recommend-bar__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.recommend-bar__title {
  font: 600 16px / 1.45 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.recommend-bar__desc {
  font-size: 14px;
  color: var(--color-text-muted);
}
.recommend-bar__link {
  flex: none;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--color-blue-strong);
  transition: transform var(--transition-fast) var(--ease-out);
}
.recommend-bar:hover .recommend-bar__link {
  transform: translateX(3px);
}

@media (max-width: 767px) {
  .recommend-bar {
    padding: 18px 20px;
  }
}

/* ---------- 4. Why (스크롤 카드 스와이프) ---------- */
/* 기본(JS 없음 · 동작 줄이기): 카드 그리드. card-swipe.js 가 .is-swipe 를 붙이면 고정 무대 + 스크롤 연동 */
.why {
  --why-card-w: clamp(260px, 26vw, 340px);
}
/* .panel-frame 위 소프트 배경 패널 */
.why__panel {
  background: var(--color-bg-soft);
}

.why__sticky {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  padding: var(--section-space) var(--gutter);
}

.why__title {
  text-align: center;
}

.why__stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: calc(var(--container) - var(--gutter) * 2);
}

.why-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  aspect-ratio: 4 / 5;
  padding: 32px;
  overflow: hidden;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 30px 60px -34px rgba(20, 25, 46, 0.3);
  transition: background 0.45s ease, color 0.45s ease;
}
.why-card__num {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-blue-strong);
}
.why-card__title {
  margin-top: auto;
  position: relative;
  font: 800 30px / 1.2 var(--font-display);
  letter-spacing: var(--ls-display);
}
.why-card__desc {
  position: relative;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--color-text-muted);
  transition: color 0.45s ease;
}

/* 카드 그래픽: 투명 배경 3D 아이콘 (흰 카드 · 어두운 카드 모두에 사용) */
.why-card__art {
  position: absolute;
  top: 6%;
  right: 4%;
  width: 66%;
  height: auto;
  pointer-events: none;
  transition: transform 0.6s var(--ease-out);
}
.why-card.is-active .why-card__art {
  transform: scale(1.06) translateY(-4px);
}

.why-card.is-active {
  background: var(--color-ink);
  color: #fff;
}
.why-card.is-active .why-card__desc {
  color: var(--color-dark-text-muted);
}

.why__dots {
  display: none;
}

/* ----- 스크롤 연동 모드 ----- */
.why.is-swipe {
  height: calc(100svh + (var(--why-count, 4) - 1) * 70svh); /* 카드 1장당 70svh 스크롤 */
}
.why.is-swipe .why__panel {
  height: 100%;
}
.why.is-swipe .why__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 600px;
  gap: 0;
  padding: calc(var(--header-height) + 32px) 0 32px;
  overflow: hidden;
  border-radius: inherit; /* 넘어가는 카드가 패널 모서리 밖으로 삐져나오지 않게 */
}
.why.is-swipe .why__stage {
  position: relative;
  display: block;
  flex: 1;
  width: 100%;
  max-width: none;
}
.why.is-swipe .why-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--why-card-w);
  margin: calc(var(--why-card-w) * -0.625) 0 0 calc(var(--why-card-w) / -2); /* 4:5 카드 가운데 */
  will-change: transform, opacity;
}
.why.is-swipe .why__dots {
  display: flex;
  gap: 8px;
}
.why__dots span {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  transition: width 0.3s var(--ease-out), background 0.3s ease;
}
.why__dots span.is-active {
  width: 22px;
  background: var(--color-ink);
}

@media (max-width: 767px) {
  .why {
    --why-card-w: min(72vw, 300px);
  }
  .why-card {
    padding: 26px;
    border-radius: 22px;
  }
  .why-card__title {
    font-size: 26px;
  }
}

/* ----- 4-1. 카드 4개 나란히 (스크롤 연동 없는 버전) ----- */
.why--grid .why__stage {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.why--grid .why-card {
  padding: 28px;
}
.why--grid .why-card__title {
  font-size: clamp(24px, 2.2vw, 30px);
}

@media (max-width: 1023px) {
  .why--grid .why__stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .why--grid .why__stage {
    gap: 12px;
  }
  .why--grid .why-card {
    gap: 8px;
    aspect-ratio: auto;
    min-height: 240px;
    /* 위쪽은 아이콘 자리(카드 폭의 58% 정사각형)만큼 비워 제목이 아이콘 밑으로 들어가지 않게 한다 */
    padding: calc(58% + 16px) 18px 20px;
  }
  .why--grid .why-card__num {
    position: absolute;
    top: 20px;
    left: 18px;
  }
  .why--grid .why-card__art {
    top: 10px;
    width: 58%;
  }
  .why--grid .why-card__title {
    margin-top: 0; /* 카드 높이가 달라도 제목이 같은 높이에서 시작 */
    font-size: 20px;
  }
  .why--grid .why-card__desc {
    font-size: 13px;
  }
  .why--grid .why-card__desc br {
    display: none;
  }
}

/* ---------- 5. Benefits ---------- */
/* 다른 섹션처럼 제목 가운데 정렬, 혜택 카드 2개는 1:1로 나란히 비교 */
.benefits__title {
  text-align: center;
}
.benefits__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
/* 개인 · 기업 카드는 대등한 선택지라 같은 모습으로 둔다.
   서비스 행 차량 박스와 같은 연한 블루 그라데이션 (아래 잉크 푸터와 진한 면이 겹치지 않게) */
.benefit-card {
  min-width: 0;
  background: var(--gradient-vehicle);
  --btn-white-text: var(--color-text);
}
.benefit-card .btn--white {
  box-shadow: 0 10px 24px -14px rgba(20, 25, 46, 0.35);
}

.benefit-card__title {
  font: 800 clamp(28px, 3vw, 34px) / 1.25 var(--font-display);
  letter-spacing: var(--ls-snug);
}

.benefit-card .btn {
  align-self: flex-start;
  margin-top: auto;
  padding: 15px 26px;
  font-size: var(--fs-body);
}
.benefit-card .t-body {
  margin-bottom: 8px;
}

/* ----- 혜택 카드 3D 그림 (도장 쿠폰 · 세금계산서) -----
   넓은 PC(1200px~): 카드 오른쪽 위에 띄운다. 그보다 좁으면 설명과 겹치지 않게 제목 위에 작게 둔다.
   카드가 화면에 들어오면 살짝 튀어 오르며 나타난다 */
.benefit-card {
  position: relative;
}
.benefit-card__art {
  width: 120px;
  height: auto;
  margin: -8px 0 0 -8px;
  pointer-events: none;
}
@media (min-width: 1200px) {
  .benefit-card__art {
    position: absolute;
    top: 12px;
    right: 16px;
    width: clamp(160px, 16vw, 210px);
    margin: 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal-on .benefit-card:not(.is-revealed) .benefit-card__art {
    opacity: 0;
  }
  .reveal-on .benefit-card.is-revealed .benefit-card__art {
    animation: benefit-art-pop 0.7s cubic-bezier(0.3, 1.4, 0.5, 1) 0.35s backwards;
  }
}
@keyframes benefit-art-pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.85);
  }
}

/* ----- 혜택 카드 장식 애니메이션 (이전 HTML 그림, 현재 hidden) -----
   카드가 화면에 들어와 .is-revealed 가 붙으면 한 번만 재생한다.
   JS가 없거나 동작 줄이기 설정이면 처음부터 끝난 모습(도장 찍힘 · 계산서 발행)으로 보인다 */
.stamp-art,
.invoice-art {
  margin-bottom: 8px;
}

/* 도장 쿠폰: 칸 5개 중 4개에 도장이 하나씩 찍힌다 (마지막 칸은 비워 "계속 모으는" 느낌) */
/* 옆 카드의 계산서 그림과 높이를 맞춰 두 카드 제목이 같은 줄에서 시작하게 한다 */
.stamp-art {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 96px;
}
@media (max-width: 767px) {
  .stamp-art {
    min-height: 0;
  }
}
.stamp-art__slot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px dashed rgba(20, 25, 46, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}
.stamp-art__stamp {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--color-blue);
  border-radius: 50%;
  background: rgba(47, 107, 255, 0.1);
  color: var(--color-blue);
  font: 800 11px / 1 var(--font-display);
  font-style: normal;
  letter-spacing: -0.02em;
  transform: rotate(-14deg);
}

/* 세금계산서: 종이가 올라오고 줄이 채워진 뒤 발행 체크가 붙는다 */
.invoice-art {
  position: relative;
  width: 132px;
}
.invoice-art__paper {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px 14px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
  border-radius: 10px;
}
.invoice-art__head {
  margin-bottom: 2px;
  font: 800 11px / 1 var(--font-display);
  color: var(--color-text);
}
.invoice-art__row,
.invoice-art__total {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: #d9deeb;
  transform-origin: 0 50%;
}
.invoice-art__row:nth-of-type(2) { width: 100%; }
.invoice-art__row:nth-of-type(3) { width: 78%; }
.invoice-art__row:nth-of-type(4) { width: 90%; }
.invoice-art__total {
  width: 56%;
  margin: 4px 0 0 auto;
  background: var(--color-ink);
  transform-origin: 100% 50%;
}
.invoice-art__badge {
  position: absolute;
  right: -12px;
  bottom: -10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-blue);
  color: #fff;
  box-shadow: 0 8px 16px -8px rgba(47, 107, 255, 0.7);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-on .benefit-card .stamp-art__stamp,
  .reveal-on .benefit-card .invoice-art__paper,
  .reveal-on .benefit-card .invoice-art__row,
  .reveal-on .benefit-card .invoice-art__total,
  .reveal-on .benefit-card .invoice-art__badge {
    opacity: 0;
  }

  .reveal-on .benefit-card.is-revealed .stamp-art__stamp {
    animation: stamp-press 0.42s cubic-bezier(0.3, 1.4, 0.5, 1) both;
  }
  .stamp-art__slot:nth-child(1) .stamp-art__stamp { animation-delay: 0.5s; }
  .stamp-art__slot:nth-child(2) .stamp-art__stamp { animation-delay: 0.65s; }
  .stamp-art__slot:nth-child(3) .stamp-art__stamp { animation-delay: 0.8s; }
  .stamp-art__slot:nth-child(4) .stamp-art__stamp { animation-delay: 0.95s; }

  .reveal-on .benefit-card.is-revealed .invoice-art__paper {
    animation: invoice-rise 0.6s var(--ease-out) 0.45s both;
  }
  .reveal-on .benefit-card.is-revealed .invoice-art__row,
  .reveal-on .benefit-card.is-revealed .invoice-art__total {
    animation: invoice-fill 0.4s var(--ease-out) both;
  }
  .invoice-art__row:nth-of-type(2) { animation-delay: 0.75s; }
  .invoice-art__row:nth-of-type(3) { animation-delay: 0.87s; }
  .invoice-art__row:nth-of-type(4) { animation-delay: 0.99s; }
  .invoice-art__total { animation-delay: 1.15s; }
  .reveal-on .benefit-card.is-revealed .invoice-art__badge {
    animation: badge-pop 0.42s cubic-bezier(0.3, 1.4, 0.5, 1) 1.4s both;
  }
}

/* 위에서 크게 내려와 꾹 눌리듯 자리 잡는다 */
@keyframes stamp-press {
  0% {
    opacity: 0;
    transform: scale(1.9) rotate(-26deg);
  }
  60% {
    opacity: 1;
    transform: scale(0.9) rotate(-12deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-14deg);
  }
}
@keyframes badge-pop {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes invoice-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes invoice-fill {
  from {
    opacity: 1;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* ---------- 모바일: 타이틀 가운데 정렬 ---------- */
@media (max-width: 767px) {
  .hero__copy {
    align-items: center;
    text-align: center;
  }
  .hero__word {
    right: 0; /* left·right 0 + text-align 으로 회전 단어도 가운데 */
  }
  .hero__copy .btn-group {
    justify-content: center;
  }
  /* 전화 · 온라인 접수 버튼을 하단 고정 바(.contact-bar)처럼 같은 폭으로 나란히 둔다 */
  .hero__copy .btn-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .hero__copy .btn-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    font-size: var(--fs-small);
  }
  .hero__copy .btn-group .btn[data-link='phone']::before {
    margin-right: 6px;
  }

  .section__head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .benefits__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 모바일: 서비스 패널 · 강점 카드 · 혜택 카드의 제목과 설명을 가운데 정렬 (섹션 제목과 맞춘다) */
@media (max-width: 767px) {
  .service-panel__body {
    align-items: center;
    text-align: center;
  }
  .why-card {
    text-align: center;
  }
  .why-card__art {
    right: 17%;
  }
  .benefit-card {
    align-items: center;
    text-align: center;
  }
  .benefit-card__art {
    margin-left: 0;
  }
  .benefit-card .btn {
    align-self: center;
  }
}

/* 아주 좁은 화면(320px 대): 반 칸짜리 버튼에 전화번호가 넘치지 않게 줄인다 (layout.css 의 .contact-bar 와 같은 값) */
@media (max-width: 359px) {
  .hero__copy .btn-group .btn {
    padding-inline: 4px;
    font-size: 13px;
  }
  .hero__copy .btn-group .btn[data-link='phone']::before {
    margin-right: 4px;
  }
}

/* 태블릿(햄버거 메뉴 구간 768~1023px)에서도 히어로 타이틀을 가운데로. 767px 이하 규칙과 같은 모양 */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero__copy {
    align-items: center;
    text-align: center;
  }
  .hero__word {
    right: 0;
  }
  .hero__copy .btn-group {
    justify-content: center;
  }
}
