/* 걸레받이교체 — 8FUN. 디자인 시스템: 쿨 네이비 + 앰버 액센트, 각진(no-radius) 모던 스킴 */
:root {
  /* Primary — 딥 네이비 */
  --c-primary:   #1F3A5F;
  --c-primary-2: #2E5484;
  --c-primary-3: #4A73A8;

  /* Accent — 앰버/골드 */
  --c-accent:    #E0A43B;
  --c-accent-2:  #F2CE86;

  /* Background */
  --c-bg:        #FFFFFF;
  --c-bg-soft:   #F4F6F9;
  --c-bg-warm:   #E9EEF4;

  /* Border */
  --c-border:    #D3DBE5;
  --c-border-2:  #E3E9F0;

  /* Text */
  --c-text:      #16202E;
  --c-text-sub:  #45566B;
  --c-text-light:#8494A6;
  --c-white:     #FFFFFF;

  /* Typography */
  --font-display: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  --font-body:    'Pretendard Variable', 'Apple SD Gothic Neo', sans-serif;

  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1.0625rem;  /* 40-50대 타겟 — 기본 크기 상향 */
  --fs-lg:   1.1875rem;
  --fs-xl:   1.375rem;
  --fs-2xl:  1.625rem;
  --fs-3xl:  2rem;
  --fs-4xl:  2.5rem;
  --fs-5xl:  3.25rem;

  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --trans-fast: 150ms ease;
  --trans-base: 250ms ease;

  --radius: 0;
  --shadow-sm: 0 2px 8px rgba(22,32,46,0.07);
  --shadow-md: 0 8px 24px rgba(22,32,46,0.12);
  --shadow-lg: 0 16px 40px rgba(22,32,46,0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  word-break: keep-all;      /* 의미단위 줄바꿈: 어절 중간에서 끊지 않음 */
  overflow-wrap: break-word;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
  line-height: 1.35;
  word-break: keep-all;
  margin: 0 0 var(--space-4);
  color: var(--c-text);
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
p { margin: 0 0 var(--space-4); word-break: keep-all; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 var(--space-6); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border-2);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.site-logo { font-family: var(--font-display); font-weight: var(--fw-extrabold); font-size: var(--fs-lg); color: var(--c-primary); }
.site-nav { display: flex; align-items: center; gap: var(--space-8); }
.site-nav a:not(.nav-cta-btn) { position: relative; font-weight: var(--fw-semibold); color: var(--c-text-sub); transition: color var(--trans-fast); }
.site-nav a:not(.nav-cta-btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--c-primary); transition: width var(--trans-base);
}
.site-nav a:not(.nav-cta-btn):hover { color: var(--c-primary); }
.site-nav a:not(.nav-cta-btn):hover::after { width: 100%; }
.nav-cta-btn {
  background: var(--c-primary); color: var(--c-white) !important;
  padding: var(--space-3) var(--space-6); border-radius: 0;
  font-weight: var(--fw-bold) !important;
  animation: pulse-ring 3s infinite;
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .btn-outline {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  border-radius: 0;
  font-weight: var(--fw-bold);
  font-size: var(--fs-lg);
  transition: background var(--trans-fast), transform var(--trans-fast), box-shadow var(--trans-fast);
  cursor: pointer; border: none;
}
/* 버튼 위로 지나가는 각진 광택(sheen) */
.btn-primary::after, .btn-secondary::after, .btn-outline::after {
  content: ''; position: absolute; top: 0; left: -130%;
  width: 55%; height: 100%; transform: skewX(-22deg);
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.38), transparent);
  transition: left .6s ease;
}
.btn-primary:hover::after, .btn-secondary:hover::after, .btn-outline:hover::after { left: 150%; }
.btn-primary { background: var(--c-primary); color: var(--c-white); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--c-primary-2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: var(--c-accent-2); color: var(--c-text); }
.btn-secondary:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--c-primary); border: 2px solid var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: var(--c-white); transform: translateY(-3px); }
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(31,58,95,0.35); }
  70%  { box-shadow: 0 0 0 12px rgba(31,58,95,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,58,95,0); }
}

/* ---------- Hero (오버레이 금지 — 원본 사진 그대로 선명하게) ---------- */
.hero {
  padding: var(--space-24) 0 var(--space-20);
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 82% -12%, rgba(224,164,59,0.16), transparent 62%),
    linear-gradient(180deg, var(--c-bg-warm) 0%, var(--c-bg-soft) 100%);
  border-bottom: 1px solid var(--c-border-2);
}
/* 각진 액센트 라인 — 히어로 좌상단 장식 */
.hero::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 5px;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-primary-3) 40%, var(--c-accent) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-16); align-items: center; }
.hero h1 { font-size: clamp(2.75rem, 5.2vw, 4.25rem); letter-spacing: -0.02em; line-height: 1.15; }
.hero-sub { font-size: var(--fs-xl); color: var(--c-text-sub); margin-bottom: var(--space-8); max-width: 34ch; }
.hero-cta { display: flex; gap: var(--space-4); flex-wrap: wrap; }
/* 이미지 뒤 각진 앰버 프레임 — 임팩트 강조 */
.hero-media { position: relative; }
.hero-media::before {
  content: ''; position: absolute; z-index: 0;
  top: var(--space-5); right: calc(-1 * var(--space-5));
  bottom: calc(-1 * var(--space-5)); left: var(--space-5);
  border: 3px solid var(--c-accent);
}
.hero-media img {
  position: relative; z-index: 1;
  box-shadow: var(--shadow-lg); aspect-ratio: 4/3; object-fit: cover; width: 100%;
}

/* 히어로 진입 애니메이션 (스크롤 관계없이 로드 시 재생, 스태거) */
@keyframes heroUp { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes heroImg { from { opacity: 0; transform: translateY(32px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.hero h1       { animation: heroUp .8s .10s cubic-bezier(.2,.75,.25,1) both; }
.hero-sub      { animation: heroUp .8s .26s cubic-bezier(.2,.75,.25,1) both; }
.hero-cta      { animation: heroUp .8s .42s cubic-bezier(.2,.75,.25,1) both; }
.hero-media    { animation: heroImg .9s .30s cubic-bezier(.2,.75,.25,1) both; }
.hero-media::before { animation: heroUp 1s .5s ease both; }

/* ---------- Sections ---------- */
section.block { padding: var(--space-20) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto var(--space-12); }
.section-head p { color: var(--c-text-sub); }

/* ---------- NSEO 이미지 그리드 (메인, 5장 이상) ---------- */
.nseo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); }
.nseo-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.nseo-grid img { aspect-ratio: 16/9; object-fit: cover; width: 100%; transition: transform var(--trans-base); }
.nseo-grid figure:hover img { transform: scale(1.05); }
.nseo-card-more-btn { display: block; text-align: center; margin-top: var(--space-8); }

/* ---------- Card grid (서비스/시공사례/가이드) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6); }
.card {
  background: var(--c-white); border: 1px solid var(--c-border-2); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--trans-base), transform var(--trans-base);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card-body { padding: var(--space-6); }
.card-body h3 { margin-bottom: var(--space-2); }
.card-body p { color: var(--c-text-sub); font-size: var(--fs-sm); }
.card-tag {
  display: inline-block; font-size: var(--fs-xs); font-weight: var(--fw-bold);
  color: var(--c-primary); background: var(--c-bg-warm); padding: var(--space-1) var(--space-3);
  border-radius: 0; margin-bottom: var(--space-3);
}

/* ---------- 전후 비교 ---------- */
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.before-after figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; }
.before-after img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.before-after figcaption {
  position: absolute; top: var(--space-3); left: var(--space-3);
  background: var(--c-primary); color: var(--c-white); font-weight: var(--fw-bold);
  font-size: var(--fs-xs); padding: var(--space-1) var(--space-3); border-radius: 0;
}

/* ---------- 프로세스 스텝 ---------- */
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: var(--space-6); counter-reset: step; }
.process-step { text-align: center; }
.process-step .num {
  counter-increment: step; content: counter(step);
  width: 48px; height: 48px; border-radius: 0; background: var(--c-primary); color: var(--c-white);
  display: flex; align-items: center; justify-content: center; font-weight: var(--fw-bold); font-size: var(--fs-xl);
  margin: 0 auto var(--space-3);
}
.process-step .num::before { content: counter(step); }

/* ---------- 통계 박스 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: var(--space-6); }
.stat-box { background: var(--c-bg-warm); border-radius: var(--radius); padding: var(--space-6); text-align: center; }
.stat-box .stat-label { color: var(--c-text-sub); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }

/* ---------- 로컬정보 카드(지역페이지) ---------- */
.local-info-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: var(--space-4); }
.local-info-item {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--c-white); border: 1px solid var(--c-border-2); border-radius: var(--radius);
  padding: var(--space-4);
}
.local-info-item .ico { flex: none; width: 36px; height: 36px; }

/* ---------- FAQ 아코디언 ---------- */
.faq-list { display: flex; flex-direction: column; gap: var(--space-3); }
.faq-item { border: 1px solid var(--c-border-2); border-radius: var(--radius); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: var(--c-bg-soft); border: none; cursor: pointer;
  padding: var(--space-5) var(--space-6); font-weight: var(--fw-bold); font-size: var(--fs-base);
  display: flex; justify-content: space-between; align-items: center;
  transition: background var(--trans-fast);
}
.faq-q:hover { background: var(--c-bg-warm); }
.faq-q .arrow { transition: transform var(--trans-base); }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden; padding: 0 var(--space-6);
  color: var(--c-text-sub); transition: max-height var(--trans-base), padding var(--trans-base);
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 var(--space-6) var(--space-5); }

/* ---------- 타임라인 ---------- */
.timeline { position: relative; padding-left: var(--space-8); border-left: 2px solid var(--c-border); }
.timeline-item { position: relative; margin-bottom: var(--space-8); }
.timeline-item::before {
  content: ''; position: absolute; left: calc(-1 * var(--space-8) - 5px); top: 4px;
  width: 12px; height: 12px; border-radius: 0; background: var(--c-accent);
}

/* ---------- 비교표 ---------- */
.compare-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: var(--radius); }
.compare-table th, .compare-table td { padding: var(--space-4); text-align: left; border-bottom: 1px solid var(--c-border-2); font-size: var(--fs-sm); }
.compare-table thead th { background: var(--c-primary); color: var(--c-white); }
.compare-table tbody tr:nth-child(even) { background: var(--c-bg-soft); }

/* ---------- 플로팅 상담 버튼 (전 페이지, /consultation.html 링크 — tel/sms 아님) ---------- */
.floating-consult {
  position: fixed; right: var(--space-6); bottom: var(--space-6); z-index: 90;
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background: var(--c-primary); color: var(--c-white);
  font-weight: var(--fw-bold); font-size: var(--fs-base);
  box-shadow: var(--shadow-lg);
  animation: floatConsult 2.6s ease-in-out infinite;
  transition: background var(--trans-fast), transform var(--trans-fast);
}
.floating-consult svg { width: 20px; height: 20px; }
.floating-consult:hover { background: var(--c-primary-2); transform: translateY(-3px) scale(1.03); }
@keyframes floatConsult {
  0%, 100% { box-shadow: 0 8px 24px rgba(31,58,95,0.28); }
  50% { box-shadow: 0 8px 30px rgba(224,164,59,0.5); }
}
@media (max-width: 480px) {
  .floating-consult { right: var(--space-4); bottom: var(--space-4); padding: var(--space-3) var(--space-5); }
  .floating-consult span { display: none; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--c-text); color: var(--c-bg-warm); padding: var(--space-12) 0; margin-top: var(--space-16); }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-8); }
.footer-biz { font-size: var(--fs-sm); line-height: 2; opacity: 0.85; }
.footer-links { display: flex; gap: var(--space-6); font-weight: var(--fw-semibold); }
.footer-links a { transition: opacity var(--trans-fast); }
.footer-links a:hover { opacity: 0.7; }

/* ---------- 스크롤 리빌 애니메이션 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.25,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* 섹션 진입 시 자식 요소 스태거 등장 (카드/스텝/통계/그리드) */
@keyframes riseIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.reveal .card,
.reveal .process-step,
.reveal .stat-box,
.reveal .local-info-item,
.reveal .nseo-grid figure,
.reveal .card-grid figure { opacity: 0; }
.reveal.in .card,
.reveal.in .process-step,
.reveal.in .stat-box,
.reveal.in .local-info-item,
.reveal.in .nseo-grid figure,
.reveal.in .card-grid figure { animation: riseIn .6s ease both; }
.reveal.in :is(.card,.process-step,.stat-box,.local-info-item,.nseo-grid figure,.card-grid figure):nth-child(1) { animation-delay: .04s; }
.reveal.in :is(.card,.process-step,.stat-box,.local-info-item,.nseo-grid figure,.card-grid figure):nth-child(2) { animation-delay: .12s; }
.reveal.in :is(.card,.process-step,.stat-box,.local-info-item,.nseo-grid figure,.card-grid figure):nth-child(3) { animation-delay: .20s; }
.reveal.in :is(.card,.process-step,.stat-box,.local-info-item,.nseo-grid figure,.card-grid figure):nth-child(4) { animation-delay: .28s; }
.reveal.in :is(.card,.process-step,.stat-box,.local-info-item,.nseo-grid figure,.card-grid figure):nth-child(5) { animation-delay: .36s; }
.reveal.in :is(.card,.process-step,.stat-box,.local-info-item,.nseo-grid figure,.card-grid figure):nth-child(n+6) { animation-delay: .44s; }

/* 섹션 제목 하단 각진 앰버 바 — 섹션 등장 시 확장 */
.section-head h2 { position: relative; display: inline-block; padding-bottom: var(--space-4); }
.section-head h2::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 0; height: 3px; background: var(--c-accent); transition: width .6s .2s ease;
}
.reveal.in .section-head h2::after { width: 52px; }

/* 카드 이미지 호버 줌 */
.card img { transition: transform var(--trans-base); }
.card:hover img { transform: scale(1.06); }

/* 히어로 이미지 은은한 부유 모션 (진입 후) */
.hero-media img { animation: heroFloat 6s ease-in-out 1.4s infinite; }

/* ---------- 반응형 / 모바일 최적화 ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nseo-grid { grid-template-columns: repeat(2, 1fr); }
  .before-after { grid-template-columns: 1fr; }
  .site-nav { gap: var(--space-4); }
  h1 { font-size: var(--fs-3xl); }
  .site-footer .container { flex-direction: column; }
}
@media (max-width: 860px) {
  .hero { padding: var(--space-16) 0 var(--space-12); }
  .hero-media::before { display: none; }
  .hero-sub { max-width: none; }
}
@media (max-width: 480px) {
  .nseo-grid { grid-template-columns: 1fr 1fr; }
  section.block { padding: var(--space-12) 0; }
}

/* 접근성 — 모션 최소화 설정 존중 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .reveal .card, .reveal .process-step, .reveal .stat-box,
  .reveal .local-info-item, .reveal .nseo-grid figure, .reveal .card-grid figure { opacity: 1 !important; }
}
