/*
  홈픽스브라더 (tiles.koreahometech.com) 공용 스타일시트
  ----------------------------------------------------
  구조 다양화 시스템 (매 페이지 상단 주석에 동일하게 표기):
    H-1 Hero 타입    : hero-split (좌 텍스트 / 우 이미지 분할형)
    H-2 섹션 순서    : 패턴 A - 신뢰 우선형
                       Hero > Portfolio > Services > Process > About > Areas > FAQ > CTA
                       (고객 후기 섹션은 실데이터 부재로 보류)
    H-3 그리드       : grid-3 (포트폴리오 3열 그리드 기준)
    H-4 레이블 스타일 : label-number (STEP/구분 넘버링 "01, 02..." 형식)
    H-5 버튼 형태     : btn-square (사각/각진 모서리, border-radius 최소화)
    Primary 컬러      : 파스텔 스틸블루 #A0C4D8

  외부 라이브러리: Tailwind CDN 만 사용. 웹폰트는 시스템 폰트 스택으로 대체하여
  Tailwind 외 외부 리소스 호출을 만든다.
*/

:root {
  --primary: #a0c4d8;
  --primary-dark: #6b93ab;
  --primary-darker: #4e7286;
  --primary-tint: #eef5f8;
  --text-main: #262f3a;
  --text-sub: #6b7684;
  --bg-alt: #f5f8fa;
  --border-soft: #e6ecef;
  --radius-card: 1.25rem;
  --radius-btn: 6px;
  --shadow-card: 0 2px 10px -4px rgba(38, 47, 58, 0.1), 0 1px 2px rgba(38, 47, 58, 0.06);
  --shadow-card-hover: 0 20px 32px -16px rgba(38, 47, 58, 0.22), 0 2px 6px rgba(38, 47, 58, 0.08);
}

* {
  word-break: keep-all;
  overflow-wrap: break-word;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo",
    -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.6;
}

/* FOUC 방지: Tailwind CDN 로딩 전 레이아웃 흔들림 최소화를 위한 최소 골격 스타일 */
header.site-header {
  min-height: 76px;
}
section.hero {
  min-height: 480px;
}

/* 카드 공통 */
.card {
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: #d7e4ea;
}
.card img {
  transition: transform 0.35s ease;
}
.card:hover img {
  transform: scale(1.04);
}

/* 버튼: btn-square 스타일 - 각진 사각 형태 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-btn);
  padding: 0.9rem 1.85rem;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background: var(--primary-darker);
  color: #fff;
  box-shadow: 0 10px 20px -10px rgba(78, 114, 134, 0.6);
}
.btn-primary:hover {
  background: var(--text-main);
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -10px rgba(38, 47, 58, 0.4);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary-darker);
  color: var(--primary-darker);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* 레이블: label-number 스타일 (채워진 원형 배지) */
.label-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--primary-darker);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 6px 14px -6px rgba(78, 114, 134, 0.55);
}

/* 이미지 위에 겹치는 순번 배지 (포트폴리오 카드용) */
.thumb-badge {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-darker);
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px -3px rgba(38, 47, 58, 0.35);
  backdrop-filter: blur(2px);
}

/* 섹션 공통 여백 */
.section {
  padding-top: 4.75rem;
  padding-bottom: 4.75rem;
}
.section-alt {
  background: var(--bg-alt);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-darker);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.section-eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.35rem;
  height: 2px;
  background: var(--primary-darker);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
}

.section-desc {
  color: var(--text-sub);
  line-height: 1.75;
}

/* 그리드: grid-3 (포트폴리오 기준 3열) */
.grid-portfolio {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.75rem;
}
@media (min-width: 640px) {
  .grid-portfolio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .grid-portfolio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 이미지 비율 고정 (CLS 방지 보조) */
.ratio-4-3 {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* 히어로 / 회사소개 이미지: 세로 사진의 과도한 여백을 줄이기 위한 높이 제한 */
.media-frame {
  overflow: hidden;
  border-radius: var(--radius-card);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 히어로 배경 장식 */
.hero {
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -140px;
  left: -160px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, var(--primary-tint) 0%, rgba(238, 245, 248, 0) 70%);
  z-index: 0;
  pointer-events: none;
}
.hero > * {
  position: relative;
  z-index: 1;
}

/* 히어로 좌/우 분할 레이아웃 */
.hero-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.75rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.25rem;
  }
}

.hero-desc {
  color: var(--text-sub);
  line-height: 1.75;
  margin-top: 1.1rem;
  font-size: 1rem;
}
@media (min-width: 640px) {
  .hero-desc {
    font-size: 1.05rem;
  }
}

/* 히어로 신뢰 배지 */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--primary-tint);
  border: 1px solid #dcebf1;
  color: var(--primary-darker);
  font-weight: 700;
  font-size: 0.8rem;
}
.trust-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* 히어로 서비스 바로가기 카드 */
.hero-service-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.85rem;
}
.hero-service-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-soft);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.hero-service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.hero-service-card img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.hero-service-card .name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
}
.hero-service-card .link {
  display: block;
  font-size: 0.75rem;
  color: var(--primary-darker);
  margin-top: 0.15rem;
  font-weight: 600;
}

/* 히어로 이미지 슬라이더 */
.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  aspect-ratio: 4 / 4.6;
}
.hero-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-slider img.active {
  opacity: 1;
}
.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(20, 26, 33, 0.82), rgba(20, 26, 33, 0) 75%);
  color: #fff;
}
.hero-caption .brand {
  font-weight: 800;
  font-size: 1.05rem;
}
.hero-caption .desc {
  font-size: 0.85rem;
  opacity: 0.88;
  margin-top: 0.25rem;
}
.hero-caption .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}
.btn-primary.on-dark {
  background: #fff;
  color: var(--primary-darker);
  box-shadow: none;
}
.btn-primary.on-dark:hover {
  background: var(--primary-tint);
  color: var(--primary-darker);
}
.btn-outline.on-dark {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
}
.btn-outline.on-dark:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
  color: #fff;
}

/* 진행절차 스텝 연결선 (데스크톱) */
.process-grid {
  position: relative;
}
.process-step {
  position: relative;
}
@media (min-width: 1024px) {
  .process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 2.5rem;
    left: calc(100% + 0.5rem);
    width: calc(100% - 1rem);
    max-width: 1.5rem;
    height: 2px;
    background: var(--border-soft);
  }
}

/* 네비게이션 */
.nav-link {
  color: var(--text-sub);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--primary-darker);
}

/* 플로팅 버튼 영역 */
.floating-wrap {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.floating-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-btn);
  box-shadow: 0 10px 24px -8px rgba(43, 52, 64, 0.35);
  transition: transform 0.2s ease;
}
.floating-btn:hover {
  transform: translateY(-2px) scale(1.04);
}

/* FAQ 아코디언 */
.faq-item {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.faq-item:hover {
  border-color: #d7e4ea;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-weight: 700;
  background: #fff;
  cursor: pointer;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: var(--bg-alt);
}
.faq-answer-inner {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-sub);
  line-height: 1.7;
}
.faq-item.open {
  border-color: var(--primary);
}
.faq-item.open .faq-answer {
  max-height: 400px;
}
.faq-icon {
  transition: transform 0.2s ease, color 0.2s ease;
  color: var(--primary-darker);
  flex-shrink: 0;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* 지역 배지 */
.area-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-btn);
  background: #fff;
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.area-badge:hover {
  border-color: var(--primary);
  color: var(--primary-darker);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--text-main);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}
