/* =============================================================
   나비가 상조 — 디자인 시스템 v1.0
   naviga-style.css

   ⚠️  아래 항목은 절대 변경 금지입니다 ⚠️
   ┌─────────────────────────────────────────────────────────┐
   │  [LOCKED-1]  히어로 배경 그라데이션  .hero-section-bg   │
   │  [LOCKED-2]  격자무늬 오버레이      .hero-grid-overlay  │
   │  [LOCKED-3]  폰트                   Pretendard          │
   │  [LOCKED-4]  카드 스타일            얇은 1px 실선,      │
   │                                     border-radius 없음  │
   │  [LOCKED-5]  브랜드 컬러 변수       --color-* 전체      │
   │  [LOCKED-6]  기본 배경색            #f8f6f1 아이보리    │
   └─────────────────────────────────────────────────────────┘

   사용법:
   • 모든 색상은 var(--color-primary) 형태로 참조
   • 새 컴포넌트 추가 시 기존 변수 활용, 직접 색상 코드 금지
   • 카드/박스는 반드시 .card 또는 .card-sm 클래스 사용
   • 섹션 배경 변경 시 --bg-* 변수 중 선택
============================================================= */


/* ─────────────────────────────────────────────────────────────
   [LOCKED-5] CSS 디자인 토큰 (변수) — 절대 변경 금지
   ───────────────────────────────────────────────────────────── */
:root {

  /* 브랜드 컬러 3종 */
  --color-primary:    #1c3d31;          /* 딥 그린 — 메인 */
  --color-secondary:  #1e3a5f;          /* 네이비 — 보조 */
  --color-accent:     #92580a;          /* 앰버/골드 — 프리미엄 */

  /* 보조 컬러 */
  --color-danger:     #b91c1c;          /* 긴급/오류 */
  --color-muted:      #6b7280;          /* 흐린 텍스트 */

  /* [LOCKED-6] 배경색 — 절대 변경 금지 */
  --bg-base:          #f8f6f1;          /* 아이보리 기본 배경 */
  --bg-white:         #ffffff;          /* 카드 내부 배경 */
  --bg-faint:         #fafaf9;          /* 비교표 열세 칸 */

  /* 텍스트 */
  --color-text:        #1a1a1a;
  --color-text-muted:  rgba(26, 26, 26, 0.62);
  --color-text-faint:  rgba(26, 26, 26, 0.40);
  --color-text-alpha:  #1a1a1a99;       /* hero-description용 */

  /* [LOCKED-4] 카드 실선 — 절대 변경 금지 */
  --border-color:     #e0ded8;
  --border:           1px solid var(--border-color);

  /* 골드 테두리 (브랜드 배지·히어로 박스용) */
  --border-gold:      rgba(184, 150, 106, 0.28);

  /* 그림자 */
  --shadow-sm:  0 10px 28px rgba(28, 61, 49, 0.10);
  --shadow-md:  0 14px 28px rgba(28, 61, 49, 0.08);
  --shadow-lg:  0 20px 40px rgba(28, 61, 49, 0.12);

  /* [LOCKED-3] 폰트 — 절대 변경 금지 */
  --font-base:  'Pretendard', sans-serif;

  /* 섹션 여백 */
  --section-py: 5rem;
}


/* ─────────────────────────────────────────────────────────────
   기본 리셋 & 바디 — [LOCKED-3] 폰트 변경 금지
   ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  font-family: var(--font-base);        /* [LOCKED-3] */
  font-weight: 300;
  color: var(--color-text);
  background: var(--bg-base);           /* [LOCKED-6] */
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}


/* ─────────────────────────────────────────────────────────────
   [LOCKED-1] 히어로 배경 그라데이션 — 절대 변경 금지
   ───────────────────────────────────────────────────────────── */
.hero-section-bg {
  background:
    linear-gradient(160deg, #1c3d31 0%, #14302600 60%),
    #f8f6f1;
}

/* ─────────────────────────────────────────────────────────────
   [LOCKED-2] 격자무늬 오버레이 — 절대 변경 금지
   ───────────────────────────────────────────────────────────── */
.hero-grid-overlay {
  background-image:
    repeating-linear-gradient(
      0deg,
      #1a1a1a 0, #1a1a1a 1px,
      transparent 1px, transparent 48px
    ),
    repeating-linear-gradient(
      90deg,
      #1a1a1a 0, #1a1a1a 1px,
      transparent 1px, transparent 48px
    );
}


/* ─────────────────────────────────────────────────────────────
   타이포그래피 스케일
   ───────────────────────────────────────────────────────────── */
.t-hero {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.t-h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.t-h2 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.t-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.t-body {
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.7;
}

.t-num {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 200;
  letter-spacing: -0.04em;
}

.hero-description {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text-alpha);
}


/* ─────────────────────────────────────────────────────────────
   [LOCKED-4] 카드 / 박스 — 얇은 1px 실선, border-radius 없음
   새 박스 컴포넌트 추가 시 반드시 이 변수 사용
   ───────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border: var(--border);               /* [LOCKED-4] */
  border-radius: 0;                    /* [LOCKED-4] 절대 추가 금지 */
  padding: 2rem;
}

.card-sm {
  background: var(--bg-white);
  border: var(--border);               /* [LOCKED-4] */
  border-radius: 0;                    /* [LOCKED-4] */
  padding: 1.25rem;
}

/* 섹션 구분선 */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}


/* ─────────────────────────────────────────────────────────────
   패키지 카드 — 3티어 테마
   ───────────────────────────────────────────────────────────── */

/* 테두리 색상 */
.pkg-theme-t1 { border-color: rgba(28,  61,  49, 0.125); }
.pkg-theme-t2 { border-color: rgba(30,  58,  95, 0.125); }
.pkg-theme-t3 { border-color: rgba(146, 88,  10, 0.125); }

/* 상단 액센트 바 */
.pkg-theme-t1 .pkg-card-accent { background: var(--color-primary); }
.pkg-theme-t2 .pkg-card-accent { background: var(--color-secondary); }
.pkg-theme-t3 .pkg-card-accent { background: var(--color-accent); }

/* 부가 텍스트 */
.pkg-subnote        { opacity: 0.75; }
.pkg-subnote-t1     { color: var(--color-primary); }
.pkg-subnote-t2     { color: var(--color-secondary); }
.pkg-subnote-t3     { color: var(--color-accent); }

/* 추천 카드 강조 */
.pkg-card-recommended {
  border-color: var(--color-primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}


/* ─────────────────────────────────────────────────────────────
   패키지 아이콘 도형
   ───────────────────────────────────────────────────────────── */
.shape-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 24px solid transparent;
  border-right: 24px solid transparent;
  border-bottom: 42px solid currentColor;
}

.shape-square {
  width: 44px;
  height: 44px;
  border: 1.5px solid currentColor;
}

/* SVG 라인 아이콘 */
.icon-line {
  stroke-width: 1;
  fill: none;
  stroke: currentColor;
}


/* ─────────────────────────────────────────────────────────────
   비교표 (경쟁사 vs 나비가)
   ───────────────────────────────────────────────────────────── */
.comp-winner {
  background: linear-gradient(135deg, var(--color-primary) 0%, #264d3e 100%);
  color: var(--bg-white);
}

.comp-loser {
  background: var(--bg-faint);
  color: var(--color-muted);
}

.comp-check { color: var(--color-primary); }
.comp-x     { color: var(--color-danger); }

.compare-chart-box { height: 320px; }

/* 승리 셀 하이라이트 */
.win-cell { position: relative; }
.win-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(200, 175, 126, 0.08);
}


/* ─────────────────────────────────────────────────────────────
   애니메이션
   ───────────────────────────────────────────────────────────── */

/* 긴급 버튼 파동 */
@keyframes pulse-emergency {
  0%, 100% { box-shadow: 0 0 0 0   rgba(185, 28, 28, 0.35); }
  50%       { box-shadow: 0 0 0 8px rgba(185, 28, 28, 0); }
}
.pulse-e { animation: pulse-emergency 2s infinite; }

/* 부유 */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
.float { animation: float 3s ease-in-out infinite; }

/* CTA 빛 반사 (shine) */
@keyframes shine {
  0%   { left: -60%; }
  100% { left: 120%; }
}
.shine-wrap {
  overflow: hidden;
  position: relative;
}
.shine-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: shine 2.5s infinite;
}


/* ─────────────────────────────────────────────────────────────
   폼 요소
   ───────────────────────────────────────────────────────────── */

/* FAQ 아코디언 */
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-body.open { max-height: 600px; }

/* 범위 슬라이더 */
input[type="range"] {
  accent-color: var(--color-primary);
}
input[type="range"]::-webkit-slider-thumb {
  cursor: pointer;
}

/* 커스텀 체크박스 */
.cb-custom {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid #c0bdb6;
  border-radius: 0;                    /* [LOCKED-4] 네모 유지 */
  cursor: pointer;
  flex-shrink: 0;
}
.cb-custom:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath stroke='white' stroke-width='2' fill='none' d='M3 8l3.5 3.5L13 5'/%3E%3C/svg%3E");
  background-size: contain;
}

/* 폼 피드백 */
.form-feedback-meta {
  font-size: 0.8em;
  opacity: 0.6;
}


/* ─────────────────────────────────────────────────────────────
   브랜드 배지 컴포넌트 (히어로 섹션)
   ───────────────────────────────────────────────────────────── */

/* 히어로 신뢰 배지 박스 */
.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-gold);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
}

/* 브랜드 칩 (헤더 로고 컨테이너) */
.brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  padding: 7px;
  flex: 0 0 46px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 246, 241, 0.98));
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* 히어로 로고 마크 */
.hero-brand-mark {
  width: 66px;
  height: 66px;
  border-radius: 22px;
  padding: 10px;
  flex: 0 0 66px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 246, 241, 0.98));
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

/* 칩·마크 공통 이미지 처리 */
.brand-chip img,
.hero-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}

/* 텍스트 블록 */
.hero-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  min-width: 0;
}
.hero-brand-copy strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.05rem;
}
.hero-brand-copy span {
  font-size: 0.93rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}


/* ─────────────────────────────────────────────────────────────
   배지 & 라벨
   ───────────────────────────────────────────────────────────── */
.badge-up,
.badge-top {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  margin-left: 3px;
  vertical-align: middle;
  line-height: 1;
}
.badge-up  { color: var(--color-primary); }
.badge-top { color: var(--color-accent); }


/* ─────────────────────────────────────────────────────────────
   레이아웃 유틸리티
   ───────────────────────────────────────────────────────────── */

/* iOS Safe Area 대응 */
.safe-pb {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
}
.bottom-cta {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

/* 스크롤바 숨김 */
.no-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scroll::-webkit-scrollbar {
  display: none;
}

/* CTA / 긴급 링크 */
.cta-link-lg        { font-size: 1.05rem; }
.emergency-call-link { font-size: 1.1rem; }
.kakao-float-label  { font-size: 9px; }


/* ─────────────────────────────────────────────────────────────
   반응형 — 640px 이하 (모바일)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {

  /* 타이포그래피 */
  .t-hero { font-size: clamp(1.9rem, 8vw, 2.8rem); }
  .t-h1   { font-size: clamp(1.4rem, 5vw, 2rem); }
  .t-num  { font-size: clamp(1.8rem, 6vw, 2.5rem); }

  /* 카드 */
  .card    { padding: 1.25rem; }
  .card-sm { padding: 1rem; }

  /* 섹션 */
  section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* 패키지 */
  .pkg-card { padding: 1.25rem; }
  #pb-options label {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* 그리드 */
  .grid.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.grid-cols-4 { font-size: 0.75rem; }

  /* 헤더 */
  header .max-w-6xl { gap: 0.5rem; }

  /* 브랜드 칩 */
  .brand-chip {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    padding: 6px;
    flex-basis: 40px;
  }

  /* 히어로 배지 */
  .hero-brand {
    width: 100%;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  .hero-brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    padding: 8px;
    flex-basis: 54px;
  }

  .hero-brand-copy strong {
    font-size: 0.74rem;
    letter-spacing: 0.12em;
  }
  .hero-brand-copy span { font-size: 0.89rem; }

  /* 히어로 섹션 */
  .min-h-screen.flex.flex-col.justify-center.pt-20.pb-16.px-4.relative.overflow-hidden {
    padding-top: 5.5rem;
    padding-bottom: 7rem;
    min-height: auto;
  }

  .flex.flex-col.sm\:flex-row.gap-3.mb-16 { margin-bottom: 1rem; }

  /* CTA */
  .bottom-cta .max-w-lg { max-width: 100%; }
  .bottom-cta a {
    font-size: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  /* 모바일 메뉴 터치 영역 */
  #mobileMenu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}


/* ─────────────────────────────────────────────────────────────
   반응형 — 400px 이하 (초소형)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .grid.grid-cols-4    { display: none; }
  .comp-table-mobile   { display: block !important; }
}
