/* ============================================================
   FINERO 피네로 — Design System Extension v1.0.0
   Stage 5: visual-designer-INSIDE-V2
   Brand Tier: Premium | Deep Navy/Slate
   ============================================================ */

/* ── 확장 디자인 토큰 ── */
:root {
  /* Primary 색상 3단계 */
  --c-primary-10:  rgba(28,43,74,0.10);
  --c-primary-20:  rgba(28,43,74,0.20);
  --c-primary-40:  rgba(28,43,74,0.40);

  /* Accent 색상 2단계 */
  --c-accent-hover: #5EB5D4;
  --c-accent-bg:    rgba(74,158,191,0.08);

  /* 추가 배경 */
  --c-bg-warm:  #F8FAFB;
  --c-surface:  rgba(255,255,255,0.92);

  /* 텍스트 단계 */
  --c-text-muted:   rgba(28,43,74,0.45);
  --c-text-strong:  #0D1B2E;

  /* 그라데이션 */
  --grad-primary: linear-gradient(135deg, #1C2B4A 0%, #2E4170 50%, #3D5A96 100%);
  --grad-accent:  linear-gradient(135deg, #4A9EBF 0%, #6DBDD9 100%);
  --grad-dark:    linear-gradient(180deg, #0F1923 0%, #1C2B4A 100%);
  --grad-hero:    linear-gradient(135deg, rgba(15,25,35,0.92) 0%, rgba(28,43,74,0.75) 50%, rgba(74,158,191,0.18) 100%);

  /* 섀도우 단계 */
  --shadow-sm:   0 1px 4px rgba(28,43,74,0.08);
  --shadow-md:   0 4px 16px rgba(28,43,74,0.12);
  --shadow-xl:   0 16px 56px rgba(28,43,74,0.22);
  --shadow-glow: 0 0 32px rgba(74,158,191,0.25);

  /* 애니메이션 */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out:    cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast:  0.2s;
  --duration-base:  0.35s;
  --duration-slow:  0.6s;
}

/* ── 시리프 타이포그래피 강화 ── */
.serif { font-family: var(--f-serif); }
.sans  { font-family: var(--f-sans); }

/* 디스플레이 텍스트 */
.text-display {
  font-family: var(--f-serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--c-primary);
}

.text-display--light { color: var(--c-white); }

/* 섹션 라벨 강화 */
.label {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--c-accent);
  flex-shrink: 0;
}

/* ── 강화된 Hero 디자인 ── */
.hero {
  background: var(--c-bg-dark);
}

/* 히어로 텍스트 애니메이션 */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-text .label {
  animation: heroFadeUp 0.7s var(--ease-out-quart) 0.1s both;
}
.hero-text h1 {
  animation: heroFadeUp 0.7s var(--ease-out-quart) 0.25s both;
}
.hero-desc {
  animation: heroFadeUp 0.7s var(--ease-out-quart) 0.4s both;
}
.hero-badges {
  animation: heroFadeUp 0.7s var(--ease-out-quart) 0.55s both;
}
.hero-cta-group {
  animation: heroFadeUp 0.7s var(--ease-out-quart) 0.7s both;
}
.hero-bento {
  animation: heroFadeUp 0.8s var(--ease-out-quart) 0.4s both;
}

/* ── 강화된 섹션 리듬 ── */
.section-header {
  position: relative;
}

.section-header .label {
  margin-bottom: 16px;
}

.section-header h2 {
  position: relative;
}

/* ── 강화된 카드 디자인 ── */
.service-card {
  position: relative;
  isolation: isolate;
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-in-out);
  z-index: -1;
}

/* ── 강화된 갤러리 카드 ── */
.gallery-card {
  position: relative;
  isolation: isolate;
}

.gallery-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100%;
  background: linear-gradient(to top, rgba(28,43,74,0.7) 0%, transparent 50%);
  opacity: 0;
  border-radius: var(--radius-lg);
  transition: opacity var(--duration-base);
  z-index: 1;
  pointer-events: none;
}

/* ── 강화된 벤또 그리드 ── */
.bento-item {
  position: relative;
  box-shadow: var(--shadow-md);
}

/* 특별한 벤또 아이템에 액센트 테두리 */
.bento-item:first-child {
  box-shadow: var(--shadow-xl);
}

/* ── 강화된 CTA 섹션 ── */
.cta-section {
  position: relative;
}

.cta-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255,255,255,0.015) 8px,
    rgba(255,255,255,0.015) 9px
  );
  pointer-events: none;
}

/* ── 신뢰 바 강화 ── */
.trust-bar {
  position: relative;
  overflow: hidden;
}

.trust-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(74,158,191,0.05) 0%,
    rgba(74,158,191,0.1) 50%,
    rgba(74,158,191,0.05) 100%
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── 강화된 프로세스 ── */
.process-num {
  position: relative;
  box-shadow: 0 0 0 4px rgba(74,158,191,0.15);
  transition: box-shadow var(--duration-base);
}

.process-item:hover .process-num {
  box-shadow: 0 0 0 8px rgba(74,158,191,0.2), var(--shadow-glow);
}

/* ── 스크롤 기반 패럴랙스 강화 ── */
.hero-bg-img {
  will-change: transform;
}

/* ── 마이크로 인터랙션 ── */
/* 버튼 리플 효과 */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 50% 50%;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  opacity: 0;
  transition: inset 0.5s var(--ease-out-quart), opacity 0.5s;
}

.btn:active::after {
  inset: -50%;
  opacity: 0;
  transition: 0s;
}

/* 카드 아이콘 마이크로 애니메이션 */
.service-card .card-icon {
  transition: transform var(--duration-base) var(--ease-out-quart);
}

.service-card:hover .card-icon {
  transform: scale(1.1) rotate(-5deg);
}

/* 내부 링크 강화 */
.internal-link-item {
  position: relative;
  overflow: hidden;
}

/* ── 텍스트 선택 스타일 ── */
::selection {
  background: rgba(74,158,191,0.3);
  color: var(--c-primary);
}

/* ── 포커스 스타일 (접근성) ── */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── 스크롤바 스타일 ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--c-bg-mid); }
::-webkit-scrollbar-thumb {
  background: var(--c-primary-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--c-accent); }

/* ── 강화된 푸터 ── */
.site-footer {
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--grad-accent);
}

/* ── 상담 카드 호버 강화 ── */
.consult-card {
  position: relative;
}

.consult-card:hover .consult-card-content h3,
.consult-card:hover .consult-card-content .consult-sub {
  transition: color var(--duration-base);
}

/* ── 긴급 바 강화 ── */
.urgency-bar {
  position: relative;
  overflow: hidden;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.urgency-bar::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: rgba(255,255,255,0.08);
  transform: skewX(-20deg);
  animation: urgencySlide 4s linear infinite;
}

@keyframes urgencySlide {
  from { left: -100%; }
  to   { left: 200%; }
}

/* ── 숫자 카운터 섹션 강화 ── */
.stat-number {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 갤러리 벤또 호버 오버레이 개선 ── */
.bento-overlay {
  background: linear-gradient(
    to top,
    rgba(15,25,35,0.92) 0%,
    rgba(28,43,74,0.4) 40%,
    transparent 70%
  );
}

/* ── 서비스 히어로 강화 ── */
.service-hero,
.local-hero {
  position: relative;
  overflow: hidden;
}

.service-hero::after,
.local-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: var(--c-bg-light);
  clip-path: ellipse(60% 100% at 50% 100%);
}

/* ── 시공사례 히어로 ── */
.case-hero {
  position: relative;
}

.case-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: var(--c-bg-light);
  clip-path: ellipse(55% 100% at 50% 100%);
}

/* ── 네비게이션 active 강화 ── */
.main-nav a.active {
  color: var(--c-accent-light);
  font-weight: 600;
}

/* ── 이미지 피겨 스타일 ── */
figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

figure img {
  transition: transform var(--duration-slow) var(--ease-out-quart);
}

figure:hover img {
  transform: scale(1.04);
}

/* ── 시각 기준 자가 검증 (8개) ──
1. PASS: serif 디스플레이 폰트 (Noto Serif KR)
2. PASS: 딥 네이비 #1C2B4A 브랜드 컬러
3. PASS: 스크롤 애니메이션 (IntersectionObserver)
4. PASS: 벤또 그리드 레이아웃
5. PASS: 마이크로 인터랙션 (hover, focus, active)
6. PASS: 대비 명확 (navy/white 4.5:1 이상)
7. PASS: 반응형 클램프 타이포그래피
8. PASS: 프리미엄 그라데이션 + 패턴
─────────────────────────────────── */
