/* ===================== 아신하우징 공통 스타일 ===================== */
:root {
  --brand-cyan: #4FD8DE;
  --brand-cyan-dark: #2CB8C0;
  --brand-cyan-light: #E5FBFB;
  --brand-gray: #D6D6D6;
  --brand-navy: #16222E;
  --brand-navy-light: #243544;
  --brand-ink: #1E2A33;
}

* {
  font-family: 'NanumSquareRound', 'Noto Sans KR', sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

/* 모바일: 헤더 높이 변경에 맞춰 앵커 스크롤 오프셋 보정 */
section[id], div[id="contact"] {
  scroll-margin-top: 72px;
}
@media (min-width: 768px) {
  section[id], div[id="contact"] {
    scroll-margin-top: 88px;
  }
}

/* iOS Safari 자동 확대 방지: 폼 요소 폰트는 항상 16px 이상 유지 */
input, select, textarea, button {
  font-size: 16px;
}
@media (min-width: 640px) {
  input, select, textarea {
    font-size: 0.875rem; /* sm 화면부터는 디자인 의도된 text-sm 복원 */
  }
}

/* 터치 디바이스에서는 hover 애니메이션(호버 시 이동/그림자) 생략 - 클릭 시 붕 뜨는 느낌 방지 */
@media (hover: none) {
  .feature-card:hover,
  .property-card:hover,
  .btn-primary:hover {
    transform: none;
  }
}

/* 터치 타깃 최소 크기 확보 */
button, a.btn-primary, a.btn-outline, a.btn-dark {
  min-height: 44px;
}

/* 스크롤바 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: var(--brand-gray);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-cyan);
}

/* 로고 텍스트 그라디언트 */
.brand-gradient-text {
  background: linear-gradient(90deg, var(--brand-cyan-dark), var(--brand-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient {
  background-color: #16222E;
}

/* 주의: .hero-gradient와 .hero-pattern은 항상 함께 사용됨.
   background-image 프로퍼티 충돌(캐스케이드 우선순위)을 피하기 위해
   그라디언트+패턴을 .hero-pattern 한 곳에 모두 선언한다. */
.hero-pattern {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(79, 216, 222, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(79, 216, 222, 0.1) 0%, transparent 40%),
    linear-gradient(135deg, #0F1B24 0%, #16222E 45%, #1B3A3F 100%);
}

/* ===================== 다크 테마 섹션 (메인 페이지) ===================== */
/* background-color만 사용 (background shorthand는 .hero-pattern의
   background-image를 리셋해버리므로 금지 — 두 클래스가 함께 쓰임) */
.dark-section {
  background-color: var(--brand-navy);
  position: relative;
}

.dark-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dark-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(79, 216, 222, 0.12);
  color: var(--brand-cyan);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(79, 216, 222, 0.25);
}

.dark-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border-radius: 20px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  transition: all 0.3s ease;
}
.dark-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px -12px rgba(79, 216, 222, 0.25);
  border-color: rgba(79, 216, 222, 0.4);
}

.dark-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(79, 216, 222, 0.18), rgba(79, 216, 222, 0.04));
  color: var(--brand-cyan);
  border: 1px solid rgba(79, 216, 222, 0.25);
}

.dark-step-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(79, 216, 222, 0.2), rgba(79, 216, 222, 0.05));
  color: var(--brand-cyan);
  border: 1px solid rgba(79, 216, 222, 0.3);
}
@media (min-width: 640px) {
  .dark-step-badge {
    width: 64px;
    height: 64px;
  }
}

/* 다크 배경 위 매물 카드 */
.dark-section .property-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dark-section .property-card:hover {
  border-color: rgba(79, 216, 222, 0.4);
  box-shadow: 0 16px 32px -8px rgba(0,0,0,0.4);
}
.dark-section .property-card h3 {
  color: #fff;
}
.dark-section .property-card p.text-slate-400 {
  color: #94A3B8;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-cyan-light);
  color: var(--brand-cyan-dark);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--brand-cyan-dark), var(--brand-cyan));
  color: #0B2226;
  font-weight: 800;
  transition: all 0.25s ease;
  box-shadow: 0 10px 30px -10px rgba(79, 216, 222, 0.5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -8px rgba(79, 216, 222, 0.6);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.25);
  color: #fff;
  font-weight: 800;
  transition: all 0.25s ease;
}
.btn-outline:hover {
  border-color: var(--brand-cyan);
  background: rgba(79, 216, 222, 0.08);
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--brand-navy);
  color: #fff;
  font-weight: 800;
  transition: all 0.2s ease;
}
.btn-dark:hover {
  background: var(--brand-navy-light);
}

.nav-link {
  position: relative;
  font-weight: 700;
  color: var(--brand-ink);
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0%;
  height: 2px;
  background: var(--brand-cyan-dark);
  transition: width 0.25s ease;
}
.nav-link:hover {
  color: var(--brand-cyan-dark);
}
.nav-link:hover::after {
  width: 100%;
}

/* 상단 헤더 nav 버튼형 메뉴 (전체 폭에 균등 배치) */
.nav-pill-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  color: var(--brand-ink);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-align: center;
}
.nav-pill-link:hover {
  color: var(--brand-cyan-dark);
  background: var(--brand-cyan-light);
  border-color: rgba(79, 216, 222, 0.3);
}
.nav-pill-link-active {
  color: var(--brand-navy);
  background: var(--brand-cyan-light);
  border-color: rgba(79, 216, 222, 0.4);
}

/* 모바일 드롭다운 메뉴 링크 */
.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 14px 4px;
  font-weight: 800;
  color: var(--brand-ink);
  border-bottom: 1px solid #F1F5F9;
  font-size: 1rem;
}
.mobile-nav-link:last-of-type {
  border-bottom: none;
}
.mobile-nav-link:active {
  color: var(--brand-cyan-dark);
}

.feature-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(22, 34, 46, 0.06);
  border: 1px solid #F1F5F9;
  transition: all 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(79, 216, 222, 0.25);
  border-color: var(--brand-cyan);
}

.icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--brand-cyan-light), #fff);
  color: var(--brand-cyan-dark);
}

.hexagon-deco {
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
}

/* 카드 공통 */
.property-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #EEF2F5;
  box-shadow: 0 4px 16px rgba(22,34,46,0.05);
  transition: all 0.3s ease;
}
.property-card:hover {
  box-shadow: 0 16px 32px -8px rgba(22,34,46,0.15);
  transform: translateY(-4px);
}

.tag-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

/* ===================== 도면 그리기 도구 ===================== */
#floorplan-canvas {
  cursor: crosshair;
  touch-action: none;
  background-color: #ffffff;
  background-image:
    linear-gradient(to right, #eef2f4 1px, transparent 1px),
    linear-gradient(to bottom, #eef2f4 1px, transparent 1px);
  background-size: 20px 20px;
}

#floorplan-canvas.tool-select {
  cursor: default;
}
#floorplan-canvas.tool-pan {
  cursor: grab;
}

.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 12px;
  color: #64748B;
  font-size: 0.7rem;
  font-weight: 700;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.tool-btn:hover {
  background: #F1F5F9;
  color: var(--brand-ink);
}
.tool-btn.active {
  background: var(--brand-cyan-light);
  color: var(--brand-cyan-dark);
  border-color: var(--brand-cyan);
}

/* 모바일: 도구모음 가로 스크롤 시 터치 타깃 확대 + 스크롤 힌트 */
@media (max-width: 1023px) {
  .tool-btn {
    min-width: 60px;
    padding: 10px 12px;
    flex-shrink: 0;
  }
  #floorplan-canvas {
    touch-action: pan-x pan-y;
  }
}

/* 캔버스 래퍼: 모바일에서 가로 스크롤로 전체 도면 접근, 스크롤 가능함을 시각적으로 표시 */
.canvas-scroll-wrap {
  -webkit-overflow-scrolling: touch;
}

/* ===================== 인테리어 시뮬레이션 ===================== */
#interior-canvas {
  cursor: default;
  touch-action: none;
  background-color: #fdfdfd;
  background-image:
    linear-gradient(to right, #eef2f4 1px, transparent 1px),
    linear-gradient(to bottom, #eef2f4 1px, transparent 1px);
  background-size: 20px 20px;
}

.furniture-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 12px;
  color: #64748B;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  transition: all 0.15s ease;
}
.furniture-item i {
  font-size: 1.2rem;
  color: var(--brand-cyan-dark);
}
.furniture-item:hover {
  background: var(--brand-cyan-light);
  border-color: var(--brand-cyan);
  color: var(--brand-ink);
}
.furniture-item:active {
  transform: scale(0.95);
}

/* ===================== 건설안전 체크리스트 ===================== */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #F1F5F9;
  background: #FAFBFC;
  transition: all 0.15s ease;
  cursor: pointer;
}
.checklist-item:hover {
  border-color: var(--brand-cyan);
}
.checklist-item.checked {
  background: var(--brand-cyan-light);
  border-color: var(--brand-cyan);
}
.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--brand-cyan-dark);
  cursor: pointer;
  flex-shrink: 0;
}

/* 건축 미니어처 별점 */
.rating-stars i {
  color: #FBBF24;
  font-size: 0.75rem;
}

/* ===================== 시뮬레이션 슬라이더 ===================== */
input[type="range"] {
  -webkit-appearance: none;
  height: 6px;
  border-radius: 999px;
  background: #E2E8F0;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-cyan-dark);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-cyan-dark);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  cursor: pointer;
}

.option-card {
  cursor: pointer;
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  padding: 10px 6px;
  transition: all 0.2s ease;
  text-align: center;
}
@media (min-width: 640px) {
  .option-card {
    padding: 16px;
  }
}
.option-card.selected {
  border-color: var(--brand-cyan-dark);
  background: var(--brand-cyan-light);
}
.option-card:hover {
  border-color: var(--brand-cyan);
}

/* 애니메이션 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 로딩 스피너 */
.spinner {
  border: 3px solid rgba(79, 216, 222, 0.2);
  border-top-color: var(--brand-cyan-dark);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 모달 */
.modal-overlay {
  background: rgba(15, 27, 36, 0.6);
  backdrop-filter: blur(4px);
}

/* 스크롤 인디케이터 바 (시뮬레이션 결과) */
.progress-bar-bg {
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-cyan-dark), var(--brand-cyan));
  transition: width 1s ease;
}
