/* 라이트만 지원 선언 (UA 자동 다크 방지용) */
:root { color-scheme: light only; }

/* OS가 다크여도 우리 페이지는 라이트 유지 */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: light only !important; }

  /* 핵심 영역은 확실한 라이트 배경으로 고정 */
  html, body { background:#ffffff !important; color:#111 !important; }

  /* 네 사이트 구조에 맞춰 추가: 반투명/블러가 있으면 어둡게 보여서 라이트 고정 */
  header, .global-header, .global-nav, .site-nav,
  .hero, .hero-overlay, .cd-pricing-hero,
  .cd-card, .cd-result {
    background:#ffffff !important;
    /* 혹시 배경에 반투명/그라데이션을 쓰면 여기서 라이트 값으로 재정의 */
  }

  /* 자동 다크가 이미지/비디오에 필터를 먹일 때 해제 */
  html { filter: none !important; }
  img, picture, video, canvas { filter: none !important; }
}


@font-face {
  font-family: "GimpoTitle";
  src: url("../fonts/cts2688_file2.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "GimpoBatang";
  src: url("../fonts/cts2688_file4.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Arita Dotum";
  src: url("../fonts/Arita DotumKR-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "Arita Dotum";
  src: url("../fonts/Arita DotumKR-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "Arita Dotum";
  src: url("../fonts/Arita DotumKR-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: "Arita Dotum";
  src: url("../fonts/Arita DotumKR-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Arita Dotum";
  src: url("../fonts/Arita DotumKR-Thin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
}

@font-face {
  font-family: "YanoljaYache";
  src: url("../fonts/야놀자 야체 Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "YanoljaYache";
  src: url("../fonts/야놀자 야체 Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

/* ===== Moneygraphy 폰트 임포트 ===== */
@font-face {
  font-family: "Moneygraphy Pixel";
  src: url("../fonts/Moneygraphy-Pixel.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Moneygraphy Rounded";
  src: url("../fonts/Moneygraphy-Rounded.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Moneygraphy Rounded OT";
  src: url("../fonts/Moneygraphy-Rounded.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

/* ===== 공통 컨테이너: 헤더/히어로 모두 동일 사용 ===== */
:root {
  --container-max: 1200px;
  --gutter: 16px;
  --header-h: 72px;
  --cd-blue: #0b5bf1;
  --cd-dark: #000749;
  --cd-text: #222;
  --cd-border: #e9e9ee;
  --panel-bg: #fff;
} /* 헤더 높이 */

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }
}
@media (min-width: 1200px) {
  :root {
    --gutter: 28px;
  }
}
/* 헤더가 좁은 화면에서 더 커지면 높이 보정 */
@media (max-width: 1100px) {
  :root {
    --header-h: 96px;
  }
}

.cd-container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter); /* ⬅ 로고/텍스트 좌측 라인 통일 */
}

/* ===== HERO ===== */
.cd-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center; /* 이미지 높이 기준 세로 중앙 */
  padding-top: var(--header-h); /* ✅ 헤더에 가리지 않게 확보 */
  overflow: hidden;
}

/* 이미지 영역 */
.cd-hero__image-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cd-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 꽉 채우기 */
  object-position: center top; /* 기본: 상단 기준 */
  display: block; /* inline baseline 여백 제거 */
  background-color: #fff; /* contain일 때 대비용 */
}

/* ✅ 가독성 보강 오버레이 (텍스트 영역 쪽을 살짝 밝게) */
.cd-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    /* 상단에서 아래로 은은히 밝게 */ linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.7) 0%,
      rgba(255, 255, 255, 0) 60%
    ),
    /* 좌측(텍스트 위치)에서 우측으로 부드럽게 */
      linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0) 40%
      ),
    /* 기존 라디얼 하이라이트 유지 */
      radial-gradient(
        60% 45% at 35% 45%,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0) 60%
      );
  pointer-events: none;
}

/* 텍스트 컨테이너: 컨테이너 라인에 맞춰 좌측 정렬 + 세로 중앙 */
.cd-hero__inner {
  position: relative; /* 이미지 위에서 흐름에 참여 */
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center; /* 세로 중앙 */
}

/* 세로 스택 + 가운데(텍스트 상자 내부) 정렬 */
.cd-hero__text {
  display: flex;
  flex-direction: column;
  align-items: center; /* Clean Dear 아래 슬로건 센터 */
  gap: 8px;
}

/* 타이포 + ✅ 텍스트 그림자 */
.cd-hero__brand {
  margin: 0;
  font-family: "GimpoTitle";
  font-size: clamp(55px, 6vw, 77px);
  font-weight: 900;
  color: #0066f5;
  line-height: 1.5;
  text-align: left; /* 상자 기준 왼쪽 */
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.cd-hero__slogan {
  margin: 0;
  font-family: "Yeongdeok Sea";
  font-size: clamp(20px, 2.8vw, 40px); /* 모바일 가독 보정 */
  color: #0066f5;
  text-align: center; /* 두 줄을 가운데 정렬 */
  /* line-height: 1.4; */
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

/* 반응형 보정 */
@media (max-width: 1100px) {
  /* 헤더 보정은 위의 --header-h로 자동 반영됨 */
}

@media (max-width: 900px) {
  .cd-hero {
    min-height: 60vh;
  }
  /* ✅ 강아지 얼굴 가운데로 */
  .cd-hero__image {
    object-position: center center;
  }
  /* ✅ 텍스트도 화면 중앙 정렬 */
  .cd-hero__inner {
    justify-content: center;
  }
  .cd-hero__text {
    align-items: center;
    text-align: center;
  }
  .cd-hero__brand {
    font-size: clamp(50px, 6vw, 70px);
  }
  .cd-hero__slogan {
    font-size: clamp(25px, 3vw, 35px);
  }
  /* 모바일에서 오버레이를 살짝 더 강하게 */
  .cd-hero__overlay {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.1) 60%
      ),
      linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.65) 0%,
        rgba(255, 255, 255, 0) 45%
      ),
      radial-gradient(
        60% 45% at 35% 45%,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0) 60%
      );
  }
}

@media (min-width: 901px) {
  /* 데스크톱에서는 왼쪽 라인 맞춤 유지 */
  .cd-hero__inner {
    justify-content: flex-start;
  }
}

/*청소서비스종류섹션*/
/* 레이아웃 */
.cd-services {
  padding: 40px 0;
  background: #0066f5;
  color: #fff;
}

/* 섹션 제목 - 반응형 폰트 + 줄바꿈 금지 */
.cd-sec-title {
  font-family: "GimpoTitle";
  font-weight: 600;
  font-size: clamp(20px, 3vw, 40px);
  line-height: 1.06;
  white-space: nowrap;
  margin: 0 0 clamp(16px, 2vw, 28px);
  text-align: center;
  color: #ffffff;
  grid-column: 1 / -1;
}

/* =========================
   GRID: 데스크톱 4열 → 1100px 이하 2열 → 600px 이하 1열
   ========================= */
.svc-grid {
  display: grid;
  gap: clamp(12px, 2vw, 18px);
  grid-template-columns: repeat(4, 1fr); /* 기본: 4열 */
  align-items: start;
}

/* 1100px 이하: 2열 고정 */
@media (max-width: 1100px) {
  .svc-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* 600px 이하: 1열 (원치 않으면 이 블록 삭제) */
@media (max-width: 600px) {
  .svc-grid {
    grid-template-columns: 1fr !important;
  }
  .svc-info p br {
    display: none;
  }
}

/* 카드 레이아웃: 이미지 위 / 텍스트 아래 */
.svc-card {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(8px, 1.4vw, 12px);
  height: 100%;
}

/* 이미지 버튼 */
.svc-btn {
  position: relative;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  margin: 0 0 clamp(12px, 2vw, 20px);
}

.svc-img {
  width: 100%;
  aspect-ratio: 1 / 1; /* 정사각형 비율 유지 */
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

/* 이미지 호버 시 살짝 확대 (충돌 제거, 1.05 고정) */
.svc-btn:hover .svc-img {
  transform: scale(1.05);
  filter: brightness(0.9);
}

/* 오버레이 */
.svc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 2;
}
.svc-tags {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vw, 10px);
}
.svc-tags li {
  list-style: none;
  display: inline-block;
  padding: clamp(6px, 1.2vw, 10px) clamp(10px, 1.6vw, 14px);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: "Arita Dotum";
  font-weight: 600;
  font-size: clamp(14px, 2.3vw, 20px);
  line-height: 1;
  white-space: nowrap;
  color: #fff;
}

/* 클릭 토글 */
.svc-btn.active .svc-img {
  transform: scale(1.05);
  filter: brightness(0.6) blur(1px);
}
.svc-btn.active .svc-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* 텍스트 (이미지 아래) */
.svc-info {
  position: static;
  width: 100%;
  text-align: left;
  color: #fff;
  text-shadow: none;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vw, 10px);
}
.svc-info h3 {
  margin: 0;
  font-family: "Arita Dotum", sans-serif;
  font-size: clamp(20px, 2.4vw, 28px); /* 안정 폰트 범위 */
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap; /* 제목은 한 줄 유지 */
  min-height: 1.15em; /* 카드 높이 안정화 */
}
.svc-info p {
  margin: 0;
  font-family: "Arita Dotum", sans-serif;
  font-size: clamp(14px, 1.9vw, 20px);
  font-weight: 600;
  line-height: 1.35;
  white-space: normal; /* 본문은 자동 줄바꿈 */
  opacity: 0.9;
  min-height: calc(1.35em * 3); /* 문장 3줄 기준 정렬 안정화 */
}

/* 포커스 */
.svc-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* 제목 중앙 정렬 */
.svc-head {
  text-align: center;
  margin-bottom: 28px;
}
.cd-services .cd-container {
  display: block !important;
}
.svc-head,
.svc-grid {
  grid-column: 1 / -1 !important;
}

/* 600px 이하: 폰트설정 */
@media (max-width: 600px) {
  .svc-info h3 {
    font-size: 30px; /* 필요시 조정 */
  }
  .svc-info p {
    font-size: 20px; /* 필요시 조정 */
  }
  .svc-tags li {
    font-size: 30px;
  }
}

@media (max-width: 1100px) {
  .svc-info h3 {
    font-size: 30px; /* 필요시 조정 */
  }
  .svc-info p {
    font-size: 20px; /* 필요시 조정 */
  }
  .svc-tags li {
    font-size: 30px;
  }
  .svc-info p br {
    display: none;
  }
}

/* ===== 청소범위섹션===== */
/* ===== Theme ===== */
:root {
  --cd-blue: #0b5bf1;
  --cd-dark: #000749;
  --cd-text: #222;
  --cd-border: #e9e9ee;
  --panel-bg: #fff;

  /* 태블릿/모바일에서 카드/3D 공통 높이 (하향) */
  --mob-scope-h: clamp(240px, 62vw, 520px);

  /* 카드-3D 사이 간격 (타이트) */
  --scope-gap: clamp(8px, 1.2vw, 20px);
}

/* ===== Section Head ===== */
.cd-scope {
  padding: 56px 0;
}
.scope-head {
  text-align: center;
  margin-bottom: 32px;
}
.scope-head h2 {
  font-family: "GimpoTitle";
  font-weight: 600;
  font-size: clamp(20px, 3vw, 40px);
  line-height: 1.06;
  color: var(--cd-dark);
}

/* ===== 공통 래퍼 ===== */
.scope-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  place-content: center;
  justify-items: stretch;
}

/* 가운데 여백 컬럼 – 사용 안 함 */
.scope-gap {
  display: none;
}

/* ===== PC/태블릿 (>=769px): 2컬럼 + column-gap ===== */
@media (min-width: 769px) {
  .scope-wrap {
    grid-template-columns:
      minmax(280px, 40%) /* 카드 */
      minmax(0, 60%); /* 3D */
    column-gap: var(--scope-gap); /* ⬅ 실제 간격 */
    row-gap: 0;
    gap: 0;
    align-items: center;
  }

  /* 컬럼 배치 지정 필요 없음(2컬럼) */

  /* 그리드 폭을 그대로 따라가게 */
  .scope-panel-wrap,
  .scope-stage {
    justify-self: stretch;
    min-width: 0;
    width: 100%;
    margin: 0; /* 불필요한 마진 방지 */
  }

  /* 데스크톱에서는 카드 max-width 제한 해제 (비율대로) */
  .scope-panel,
  .scope-panel-wrap {
    max-width: none;
  }
}

/* ===== Panel (Card) ===== */
.scope-panel-wrap {
  width: 100%;
}
.scope-panel {
  position: relative;
  width: 100%;
  max-width: clamp(220px, 24vw, 480px); /* 모바일/태블릿 기본 상한 */
  background: var(--panel-bg);
  border: 1px solid var(--cd-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: none !important;
}
.panel-empty {
  color: #778;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.panel-card[hidden] {
  display: none;
}
.panel-card {
  position: relative;
}
.card-close {
  position: absolute;
  right: 6px;
  top: 8px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #99a;
}

/* 카드 내부: 제목 → 이미지 → 본문 */
.card-figure {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  gap: 12px;
  align-items: start;
}
.card-figure figcaption {
  display: contents;
}
.card-figure h3 {
  margin: 0 0 4px;
  color: var(--cd-dark);
  font: 700 25px/1.25 "Arita Dotum";
}

/* PC/태블릿: 비율 고정(4:3) */
.card-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--cd-border);
}

.card-figure p {
  margin: 0;
  color: #555;
  line-height: 1.5;
  font: 600 20px/1.5 "Arita Dotum";
}

/* ===== 3D Stage ===== */
.scope-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10; /* PC/태블릿에서 비율 고정 */
  border-radius: 16px;
  overflow: hidden;
  max-width: 100%;
  container-type: inline-size;
  min-height: 0;
}
.stage-img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: transform 0.28s ease;
}
.scope-stage.zoomed .stage-img {
  transform: scale(0.96);
}

/* ===== 핫스팟 ===== */
.hotspot {
  --size: clamp(26px, 4.2cqi, 44px);
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--cd-blue);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-family: "Arita Dotum";
  font-weight: 700;
  font-size: calc(var(--size) * 0.48);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.16s ease, background-color 0.16s;
  /* 기존 스타일 유지 + 아래 3줄만 추가/수정 */
  display: grid; /* flex 대신 grid */
  place-items: center; /* 가로/세로 완전 중앙 */
  line-height: 1; /* 폰트 위아래 여백 제거 */
}

/* 필요하면 아주 살짝 위로 올려 보정 (–2px ~ +2px 범위에서 튜닝) */
.hotspot {
  transform: translate(-50%, -50%) translateY(+2px);
}
/* 위 줄이 이미 transform을 쓰고 있다면 뒤에 translateY만 덧붙이면 됨 */

.hotspot:hover {
  transform: translate(-50%, -50%) scale(1.12);
}
.hotspot[aria-pressed="true"] {
  background: var(--cd-dark);
}

/* ===== 하단 카피 ===== */
.scope-copy {
  grid-column: 1 / -1;
  text-align: center;
  margin: 0 auto;
  font: 600 20px/1.2 "Arita Dotum";
  color: #333;
  max-width: 720px;
}
.highlight-bg {
  background: rgba(255, 230, 0, 0.8);
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-block;
}
.highlight-bg .emphasis {
  font-weight: 700;
  color: #d60000;
}
.extra-fee {
  color: #d60000;
  font-weight: 700;
  font-size: 0.85em;
}

/* ===== 태블릿/모바일: 이미지 높이 상한 적용 ===== */
@media (max-width: 1024px) {
  .scope-panel {
    height: auto;
  }
  .card-figure {
    height: auto;
    grid-template-rows: auto auto auto;
    gap: 10px;
  }
  .card-figure img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    max-height: clamp(140px, 28vh, 240px);
  }
}

/* ===== 모바일(<=768px): 1열 전환 ===== */
@media (max-width: 768px) {
  .scope-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
  }

  .scope-panel {
    max-width: clamp(220px, 92vw, 480px);
    width: clamp(300px, 92vw, 560px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
  }
  .panel-card,
  .panel-empty {
    flex: 1;
    overflow: visible;
  }

  .scope-stage {
    height: var(--mob-scope-h);
    width: clamp(300px, 92vw, 720px);
    margin: 0 auto;
    aspect-ratio: auto;
    min-height: 0;
  }

  .scope-panel-wrap {
    order: 1;
  }
  .scope-stage {
    order: 2;
  }
  .scope-copy {
    order: 3;
  }
}

/* 모바일: 카드 ↕ 3D 사이 여백 강화 */
@media (max-width: 768px) {
  .scope-wrap {
    row-gap: clamp(28px, 5vh, 64px);
  }
  .scope-panel-wrap {
    margin-bottom: 8px;
  }
  .scope-stage {
    margin-top: 8px;
    z-index: 0;
  }
  .scope-panel {
    z-index: 1;
    background: #fff;
  }
}

/* 작은 화면 PC 이상에서 카드 최소 너비 고정 */
@media (min-width: 769px) and (max-width: 1200px) {
  .scope-panel {
    min-width: 289px;
  }
  .scope-panel-wrap {
    min-width: 289px;
  }
}

/* ===== 특별함 섹션 (편지 부분 최소셋) ===== */
:root {
  --cd-blue: #0066f5;
  --cd-deep: #000749;
  --cd-gray: #8b8b8b;
  --cd-panel: #c9d7f4;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
  --gap: clamp(24px, 5vw, 64px);

  /* ✨ 폰트 분리 */
  --brand-font: "GimpoTitleRegular", "GimpoTitle", system-ui, -apple-system,
    "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  --letter-heading-font: "YanoljaYache"; /* 편지 제목/서명 */
  --letter-body-font: "YanoljaYache"; /* 편지 본문 */

  /* 편지글 와이프 속도 (필수: 아래에서 사용하므로 값 지정) */
  --reveal: 2.2s;
}

/* 가로 스크롤 비상 방지(원인 추적 전 임시 안전가드) */
html,
body {
  overflow-x: hidden;
}

/* 섹션 배경 */
.cd-special {
  background: var(--cd-panel);
}

/* 상단 섹션 공통 */
.special-letter {
  overflow: hidden;
} /* ← 박스가 밖으로 새는 것 차단 */

.special-letter .letter-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 16px 32px;
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 60%); /* 로고/편지 40:60 */
  gap: var(--gap);
  align-items: center;
  box-sizing: border-box;
}

/* 큰 화면에서 편지지 더 확대 */
@media (min-width: 1200px) {
  .special-letter .letter-inner {
    grid-template-columns: minmax(0, 38%) minmax(0, 62%);
  }
}

/* ── 왼쪽: 로고 ── */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-self: start;
}
.brand-mark {
  width: clamp(300px, 34vw, 520px);
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.08));
}
.brand-text h2 {
  font-family: var(--brand-font);
  font-weight: 600;
  font-size: clamp(44px, 6.5vw, 85px);
  line-height: 1.06;
  color: var(--cd-blue);
  margin: 0;
  letter-spacing: -0.5px;
}
.brand-text h3 {
  font-family: var(--brand-font);
  font-weight: 500;
  font-size: clamp(14px, 2.2vw, 28px);
  line-height: 1.15;
  color: var(--cd-blue);
  opacity: 0.9;
  margin-top: 2px;
  white-space: normal;
}

/* ── 오른쪽: 편지지 ── */
.paper {
  /* 등장 애니메이션(기본) */
  opacity: 0;
  transform: rotate(-1.5deg) scale(0.98);
  transition: opacity 1s ease, transform 1s ease;

  /* 레이아웃 */
  width: 100%;
  height: auto;
  min-height: clamp(380px, 50vh, 640px);
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow);
  box-sizing: border-box;

  /* 컨테이너 쿼리: 내부 타이포가 폭 비례 스케일 */
  container-type: inline-size;

  /* 패딩도 paper 폭 비율로 */
  padding: clamp(16px, 4cqw, 36px) clamp(20px, 5cqw, 44px);
  overflow: visible;
}
.special-letter.reveal .paper {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* 편지 타이포 */
.letter .salutation h3,
.letter .signature h3 {
  font-family: var(--letter-heading-font);
  font-weight: 700;
  font-size: clamp(33px, 4cqw, 53px);
  line-height: 1.6;
  color: var(--cd-blue);
  margin: 0 0 12px;
}
.letter .signature h3 {
  text-align: right;
  margin-top: clamp(10px, 2.8cqw, 18px);
}
.letter p {
  font-family: var(--letter-body-font);
  font-weight: 400;
  font-size: clamp(23px, 3cqw, 40px);
  line-height: clamp(1.5, 1.1 + 0.4cqi, 1.8);
  letter-spacing: 0.005em;
  color: var(--cd-blue);
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  margin: 0 0 0.9em;
}

/* 편지글 와이프 + 슬라이드 업 (p, h3 공통) */
.letter p,
.letter .salutation h3,
.letter .signature h3 {
  clip-path: inset(0 100% 0 0); /* 처음엔 가려진 상태 */
  opacity: 0;
  transform: translateY(6px);
  transition: clip-path var(--reveal) ease-out 1s,
    /* ← delay 추가 */ opacity 5s ease 1s,
    /* ← delay 추가 */ transform 4s ease 1s; /* ← delay 추가 */
}

.special-letter.reveal .letter p,
.special-letter.reveal .letter .salutation h3,
.special-letter.reveal .letter .signature h3 {
  clip-path: inset(0 0 0 0); /* 가림 해제 */
  opacity: 1;
  transform: translateY(0);
}

/* 큰 화면에서 로고-편지 간격 확대 */
@media (min-width: 1024px) {
  .special-letter .letter-inner {
    gap: clamp(64px, 12vw, 160px);
  }
}

/* ── 모바일: 세로 스택 ── */
@media (max-width: 900px) {
  .special-letter .letter-inner {
    grid-template-columns: 1fr;
    row-gap: 24px;
    justify-items: center;
  }
  .brand {
    justify-self: center;
  }
  .paper {
    min-height: clamp(320px, 52vh, 600px);
  }
}

/* ── 초소형(폰 360~320px): 넘침 방지 튜닝 ── */
@media (max-width: 480px) {
  .special-letter .letter-inner {
    padding: 48px 0px 24px; /* 좌우 여백 확보 */
  }
  .paper {
    /* 변형이 가로 폭을 살짝 늘려서 삐져나오는 걸 차단 */
    transform: none !important;
    margin: 0 auto;
    padding: clamp(14px, 4vw, 20px) clamp(16px, 5vw, 24px);
    max-width: calc(100% - 8px); /* 그림자/테두리 여유 */
  }
  /* 폰트도 살짝 다운스케일 */
  .letter .salutation h3,
  .letter .signature h3 {
    font-size: clamp(26px, 7vw, 34px);
  }
  .letter p {
    font-size: clamp(16px, 4.2vw, 18px);
  }
}

/* ===== 카드 섹션 레이아웃 ===== */
.cd-cards {
  background: #c9d7f4;
  padding: 56px 0;
}
.cd-cards .cards-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.cd-cards .cards-head {
  text-align: center;
  margin-bottom: 24px;
}
.cd-cards .cards-head h2 {
  font: 700 28px/1.2 "GimpoTitleRegular", system-ui;
  color: #000749;
}
.cd-cards .cards-head p {
  color: #333;
}
.cd-cards .cards-head span {
  color: #0066f5;
  font-weight: 700;
}

/* ===== 그리드 ===== */
.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===== 카드 공통 ===== */
:root {
  --card-radius: 18px;
  --card-ratio: 4 / 5;
}
.card {
  list-style: none;
  perspective: 1000px;
}
.card-btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--card-ratio);
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--card-radius);
  outline-offset: 4px;
  overflow: clip;
  clip-path: inset(0 round var(--card-radius));
  will-change: transform;
  transform: translateZ(0);
  transition: transform 0.22s cubic-bezier(0.2, 0.6, 0.2, 1);
  pointer-events: auto;
}
.card-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  transition: box-shadow 0.22s ease;
  z-index: 0;
}
.card-face {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  overflow: hidden;
  backface-visibility: hidden;
  transition: transform 0.5s ease, opacity 0.3s ease;
  box-shadow: none !important;
  border: none !important;
  /* pointer-events 제거 → 내부 텍스트도 개별 선택 가능 */
}
.card .front img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--card-radius);
  transform: translateZ(0);
  will-change: transform;
  pointer-events: none;
}
.card .front figcaption {
  font-family: "Moneygraphy Rounded";
  font-weight: 500;
  font-size: clamp(20px, 1.8vw, 40px);
  line-height: 1.06;
  margin-bottom: 38px;
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  z-index: 2;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.35);
  /* pointer-events 제거 → 선택 가능 */
}

/* ===== 앞면 ===== */
.card .front {
  background: #fff;
  padding: 0;
  box-shadow: none;
  transform: rotateY(0) translateZ(0.1px);
}
.card .front::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 4px #fff;
  pointer-events: none;
  z-index: 3;
}
.card .front figure {
  position: relative;
  height: 100%;
  width: 100%;
  margin: 0;
}
.card .front::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.4) 23%,
    rgba(0, 0, 0, 0) 32%
  );
}

/* ===== 호버 ===== */
@media (hover: hover) {
  .card-btn:hover,
  .card:hover .card-btn {
    transform: scale(1.012);
  }
  .card-btn:hover::after,
  .card:hover .card-btn::after {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

/* ===== 뒷면 ===== */
.card .back {
  background: #000749;
  color: #fff;
  padding: 18px 16px;
  display: grid;
  align-content: center;
  gap: 10px;
  transform: rotateY(180deg) translateZ(0.1px);
}
.card .back h3 {
  font-family: "Moneygraphy Rounded OT";
  font-weight: 500;
  font-size: clamp(18px, 3vw, 36px);
  line-height: clamp(1.2, 1vw, 1.5);
  letter-spacing: 0.2px;
  margin: 0; /* 기본 마진 제거 */
  padding-top: 15px;
}
.card .back p {
  font-family: "Moneygraphy Rounded OT";
  font-weight: 300;
  font-size: clamp(15px, 2vw, 24px);
  line-height: clamp(0.5, 2vw, 1.5);
  margin: 0; /* 기본 마진 제거 */
}

/* ===== 전환 상태 ===== */
.card.is-back .front {
  transform: rotateY(180.0001deg) translateZ(0.1px);
  opacity: 0;
}
.card.is-back .back {
  transform: rotateY(0.0001deg) translateZ(0.1px);
  opacity: 1;
}

/* ===== 타이틀 ===== */
.cd-cards .cards-head h2 {
  color: #0066f5;
  font-family: "GimpoTitle";
  font-weight: 600;
  font-size: clamp(20px, 3vw, 40px);
  line-height: 0.8;
}
.cd-cards .cards-head p {
  color: #3d3b3a;
  font-family: "GimpoTitle";
  font-weight: 500;
  font-size: clamp(15px, 3vw, 30px);
  line-height: 0.5;
  margin-top: 8px;
}
.cd-cards .cards-head p span {
  color: #000749;
  font-family: "GimpoTitle";
  font-weight: 500;
  font-size: clamp(15px, 3vw, 30px);
  line-height: 0.5;
}

/* ===== 접근성 ===== */
.card-btn {
  outline: none;
}
.card-btn:focus-visible {
  outline: 2px solid #0066f5;
  outline-offset: 2px;
}

/* ===== 조커카드 ===== */
.card.joker {
  display: none;
}
@media (min-width: 1200px) {
  .card.joker {
    display: block;
  }
}
.card.joker .card-btn {
  cursor: pointer;
}

/* ===== 서비스 이용지역 섹션 ===== */
:root {
  --cd-blue: #0066f5;
  --cd-deep: #000749;
  --cd-text: #222;
  --gap: clamp(20px, 4vw, 48px);
}

.cd-area {
  background: #fff;
  padding: clamp(48px, 10vw, 96px) 0;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.cd-area .area-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--gap);
  align-items: center;
  min-height: clamp(380px, 56vh, 620px);
}
@media (max-width: 768px) {
  .cd-area .area-wrap {
    grid-template-columns: 1fr;
    align-items: center;
    text-align: center;
  }
  .cd-area h2 {
    margin-bottom: 32px;
  }
  .cd-area h2 br {
    display: none;
  }
}

.cd-area h2 {
  font-family: "GimpoTitle";
  font-weight: 600;
  font-size: clamp(20px, 3vw, 40px);
  line-height: 1.3;
  color: var(--cd-blue);
  letter-spacing: -0.02em;
  margin: 0 0 50px 0;
}
.cd-area p {
  font-family: "Arita Dotum";
  font-size: clamp(16px, 1.9vw, 20px);
  font-weight: 500;
  line-height: 1.35;
  color: #333;
  margin: 0;
}
.cd-area p > span {
  display: block;
  font-weight: 700;
  color: var(--cd-text);
  margin-bottom: clamp(18px, 2.2vw, 22px);
}

/* 지도 컨테이너 */
.area-illust {
  margin: 0;
  justify-self: center;
  position: relative;
  width: min(100%, 520px);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.06));
}
.area-illust img {
  display: block;
  width: 100%;
  height: auto;
}
/* 레이어는 절대 배치로 베이스와 정확히 겹치기 */
.area-illust .layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}
.area-illust .layer.show {
  opacity: 1;
  transform: scale(1);
}

/* 순차 등장(텍스트/일러스트) */
.area-title,
.area-desc,
.area-illust {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.area-show {
  opacity: 1;
  transform: translateY(0);
}

/* 서비스 지역 텍스트 강조 */
.area-incheon,
.area-seoul,
.area-gyeonggi {
  display: inline-block;
  font-weight: 800;
  font-size: clamp(18px, 2.1vw, 22px);
  color: var(--cd-blue);
  animation: areaPulse 2s ease-in-out infinite;
}
@keyframes areaPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* 고정 헤더 가림 방지 */
#types,
#scope,
#special,
#areas,
#process {
  scroll-margin-top: 100px;
}
html {
  scroll-behavior: smooth;
}

/* ===== 진행절차 섹션 ===== */
:root {
  --btn-size: clamp(48px, 8vw, 60px); /* 버튼 높이 */
}

.cd-process {
  background: #0b5bf1;
  padding: 56px 0;
}
.cd-process .cd-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: block;
}

/* 타이틀 */
.process-title {
  font-family: "GimpoTitle";
  font-weight: 600;
  font-size: clamp(20px, 3vw, 40px);
  line-height: 1.06;
  color: #fff;
  text-align: center;
  margin: 20px auto 32px;
}

/* 그리드 */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* 단계 카드 */
.step {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 10px 10px 8px;
  text-align: center;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.step .step-num {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #000749;
  color: #fff;
  font-family: "Moneygraphy Rounded OT";
  font-weight: 300;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1;
}
.step img {
  width: auto;
  height: 200px;
  object-fit: contain;
  margin-bottom: 12px;
}
.step p {
  font-family: "Moneygraphy Rounded OT";
  font-weight: 500;
  font-size: clamp(20px, 1.5vw, 25px);
  color: #000;
  margin: 0;
  text-align: center;
}

/* CTA 셀 (버튼 있는 칸) */
.cta-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  min-height: 260px;
}

/* 검색창 스타일 버튼 */
.cta-search {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--btn-size) * 0.2);
  background: #fff;
  border-radius: 999px;
  height: var(--btn-size);
  padding: 0 calc(var(--btn-size) * 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
  max-width: calc(var(--btn-size) * 4);
  border: 3px solid transparent;
  z-index: 1;
}
.cta-search img {
  height: calc(var(--btn-size) * 0.75);
  width: auto;
}
.cta-search span {
  font-family: "Moneygraphy Rounded OT";
  font-weight: 500;
  font-size: calc(var(--btn-size) * 0.45);
  color: #000;
  white-space: nowrap;
}

/* 테두리 애니메이션 */
.cta-search::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 4px;
  background-size: 300% 300%;
  animation: borderFlow 3s linear infinite, neonGlow 1.5s ease-in-out infinite;

  /* 가운데 비우고 테두리만 보이게 (표준 + WebKit) */
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; /* Safari/Chrome */
  mask-composite: exclude; /* Firefox 등 */

  pointer-events: none;
  z-index: 1;
}
.cta-search.kakao::before {
  background: linear-gradient(
    90deg,
    #ffeb00,
    #ffd400,
    #dba902,
    #ffd400,
    #ffeb00
  );
}
.cta-search.naver::before {
  background: linear-gradient(
    90deg,
    #32ca5f,
    #03c23c,
    #008628,
    #03c23c,
    #32ca5f
  );
}

/* Hover */
.cta-search:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Shine */
.cta-search::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  z-index: 2;
}
.cta-search:hover::after {
  animation: shine 0.8s ease forwards;
}

/* 키프레임 */
@keyframes borderFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}
@keyframes neonGlow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.4);
  }
}
@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 150%;
  }
}

/* 클릭 유도 이미지 (그리드 안 배치) */
.click-cue {
  position: static;
  align-self: center;
  width: clamp(60px, 15vw, 90px);
  height: auto;
  margin-top: clamp(6px, 1.2vw, 12px);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
  pointer-events: none;
  transform: none;
  /* 처음엔 애니메이션 꺼둠 → JS가 cue-anim 붙이면 시작 */
  animation: none;
}
/* 클릭유도: 보여진 뒤( cue-anim )에만 점프+반짝 시작 */
.click-cue.cue-anim {
  animation: cueBounce 1.5s ease-in-out infinite,
    cueDoubleBlink 4s ease-in-out infinite !important;
}
@keyframes cueBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
/* 더블 반짝 (주기/강도는 여기서 조절 가능) */
@keyframes cueDoubleBlink {
  0%,
  7%,
  17%,
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
  2.5%,
  7.5%,
  12.5% {
    opacity: 0.85;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 1));
  }
}

/* === 반응형 === */
@media (max-width: 1024px) {
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cta-cell {
    grid-column: auto;
  }
}
@media (max-width: 560px) {
  .process-grid {
    grid-template-columns: 1fr;
  }
  .step {
    min-height: 220px;
  }
  .cta-cell {
    min-height: 180px;
    grid-column: 1 / -1;
  }
}

/* 앵커 스크롤 여백 */
#process {
  scroll-margin-top: var(--header-h, 72px);
}

/* === 순차 등장 상태 스타일 (추가) === */
#process .reveal-init {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  filter: blur(2px);
}
#process .revealed {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
  transition-delay: var(--reveal-delay, 0s);
}
#process .cta-cell.cta-hidden,
#process .click-cue.cue-hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
#process .cta-cell.cta-show,
#process .click-cue.cue-show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--reveal-delay, 0s);
}

/* 모션 최소화 접근성 */
@media (prefers-reduced-motion: reduce) {
  #process .reveal-init,
  #process .cta-cell.cta-hidden,
  #process .click-cue.cue-hidden {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .click-cue.cue-anim {
    animation: none !important;
  }
}

/* 전체 레이아웃에서 가로 스크롤 방지 */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
