/* ===== 변수 / 기본 ===== */
:root {
  --bg: #F8F9FA;
  --bg-sub: #DEE2E6;
  --accent: #343A40;
  --accent-sub: #6C757D;
  --text: #212529;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
h1 { font-size: 34px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
.icon { width: 24px; height: 24px; flex-shrink: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 50px 0; }
.section-alt { background: var(--bg-sub); }
.sr-only { position: absolute; left: -9999px; }
.cta-center { text-align: center; margin-top: 40px; }
.cta-buttons.is-center { justify-content: center; }
.section-label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-sub); margin-bottom: 8px; }
.section-head { margin-bottom: 32px; }
.section-sub { font-weight: 400; color: var(--accent-sub); margin-top: 10px; }

/* ===== 버튼 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border-radius: 8px;
  font-size: 16px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 15px; }
.cta-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== fade-in ===== */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ===== 헤더 ===== */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  background: transparent; border-bottom: none;
  transition: background .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { background: var(--bg); box-shadow: 0 1px 0 var(--bg-sub); }
.header-inner {
  width: 100%; padding: 0 24px; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo img { border-radius: 6px; }
.logo-text { font-size: 18px; font-weight: 700; color: var(--text); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.site-nav a .icon { width: 20px; height: 20px; }

.hamburger-btn {
  width: 44px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer;
}
.hamburger-btn span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }

.mobile-nav {
  position: absolute; top: var(--header-h); left: 0; width: 100%;
  background: var(--bg); border-bottom: 1px solid transparent;
  max-height: 0; overflow: hidden; visibility: hidden;
  transition: max-height .3s ease, visibility 0s linear .3s;
}
.mobile-nav.open {
  max-height: 320px; border-bottom-color: var(--bg-sub); visibility: visible;
  transition: max-height .3s ease, visibility 0s linear 0s;
}
.mobile-nav a { display: flex; align-items: center; gap: 10px; padding: 14px 24px; font-weight: 600; min-height: 44px; }
.mobile-nav a + a { border-top: 1px solid var(--bg-sub); }

/* ===== 히어로 ===== */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: flex-end;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(33,37,41,.85) 0%, rgba(33,37,41,.35) 45%, rgba(33,37,41,0) 75%);
}
.hero-content { position: relative; z-index: 1; padding: 0 24px 60px; color: var(--bg); max-width: 640px; }
.hero-content h1 { color: var(--bg); }
.hero-content p { margin-top: 14px; font-size: 16px; color: var(--bg-sub); }
.hero-content .cta-buttons { margin-top: 24px; }
.hero-content .btn-outline { border-color: var(--bg); color: var(--bg); }

/* ===== 시공사례 ===== */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.portfolio-card { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; background: var(--bg-sub); }
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(33,37,41,.55) 0%, rgba(33,37,41,.06) 55%, rgba(33,37,41,0) 80%);
}
.portfolio-card .card-title {
  position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1;
  color: var(--bg); font-size: 16px; font-weight: 700;
  opacity: 0; transform: translateY(10px); transition: opacity .3s ease, transform .3s ease;
}
.portfolio-card:hover .card-title { opacity: 1; transform: none; }

/* ===== 고민과 답변 ===== */
.concern-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.concern-card { background: var(--bg); border: 1px solid var(--bg-sub); border-radius: 12px; padding: 28px 24px; }
.concern-card .icon { width: 32px; height: 32px; color: var(--accent); margin-bottom: 16px; }
.concern-card h3 { margin-bottom: 10px; }
.concern-card p { color: var(--accent-sub); }
.concern-dots { display: none; justify-content: center; gap: 8px; margin-top: 16px; }
.concern-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-sub); opacity: .4; }
.concern-dots span.active { background: var(--accent); opacity: 1; }

/* ===== 서비스 ===== */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.service-card { display: block; border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid var(--bg-sub); transition: transform .25s ease; }
.service-card:hover { transform: translateY(-4px); }
.service-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.service-card:hover .thumb img { transform: scale(1.06); }
.service-card .link-indicator {
  position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(248,249,250,.75); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.service-card .body { padding: 16px; }
.service-card .label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-sub); }
.service-card .name { margin-top: 4px; font-size: 18px; font-weight: 700; }

/* ===== 회사소개 ===== */
.about-text { max-width: 680px; }
.about-text p { margin-bottom: 16px; }
.about-text p:last-child { margin-bottom: 0; }
.process-timeline { display: flex; gap: 12px; margin-top: 48px; position: relative; }
.process-timeline::before { content: ""; position: absolute; top: 22px; left: 16.6667%; right: 16.6667%; height: 1px; background: var(--accent-sub); opacity: .4; }
.process-step { flex: 1; text-align: center; position: relative; z-index: 1; }
.process-step .num {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; margin: 0 auto 16px; background: var(--bg);
}
.process-step h3 { margin-bottom: 8px; }
.process-step p { color: var(--accent-sub); font-size: 15px; }

.about-full { position: relative; background-size: cover; background-position: right center; background-repeat: no-repeat; color: var(--bg); }
.about-full::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(33,37,41,.85) 0%, rgba(33,37,41,.6) 45%, rgba(33,37,41,.3) 100%);
}
.about-full .container { position: relative; z-index: 1; }
.about-full .section-label { color: var(--bg-sub); }
.about-full h2 { color: var(--bg); }
.about-full .section-sub { color: var(--bg-sub); }
.about-full .about-text p { color: var(--bg); }
.about-full .process-step .num { border-color: var(--bg); color: var(--bg); background: transparent; }
.about-full .process-step h3 { color: var(--bg); }
.about-full .process-step p { color: var(--bg-sub); }
.about-full .process-timeline::before { background: var(--bg); opacity: .35; }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border: none; border-bottom: 1px solid var(--bg-sub); }
.faq-item:first-child { border-top: 1px solid var(--bg-sub); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 4px; background: var(--bg); color: var(--text); border: none; text-align: left;
  font-size: 16px; font-weight: 700; cursor: pointer; min-height: 44px;
  -webkit-appearance: none; appearance: none;
}
.faq-q .icon { color: var(--accent-sub); transition: transform .25s ease; }
.faq-item.open .faq-q .icon { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 4px 18px; color: var(--accent-sub); }

/* ===== CTA 섹션 ===== */
.cta-section { text-align: center; }
.cta-inner .section-sub { margin-bottom: 24px; }
.cta-inner .cta-buttons { justify-content: center; }

/* ===== 푸터 ===== */
.site-footer { background: var(--bg-sub); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-company { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--accent-sub); font-size: 14px; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.footer-nav .icon { width: 20px; height: 20px; }
.footer-copy { width: 100%; font-size: 13px; color: var(--accent-sub); }

/* ===== 카드형 상세페이지 공용 ===== */
.info-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.info-card { background: var(--bg); border: 1px solid var(--bg-sub); border-radius: 12px; padding: 24px; }
.info-card .icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: 12px; }
.page-hero { padding: calc(var(--header-h) + 40px) 0 40px; background: var(--bg-sub); }
.page-hero h1 { max-width: 720px; }
.page-hero p { margin-top: 12px; color: var(--accent-sub); }
.detail-media { position: relative; width: 100%; max-width: 500px; padding-top: 100%; overflow: hidden; border-radius: 12px; margin-bottom: 24px; }
.detail-media img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; margin-bottom: 0; }
.sitemap-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sitemap-group h2 { margin-bottom: 14px; }
.sitemap-group a { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--bg-sub); min-height: 44px; }

/* ===== 반응형 ===== */
@media (min-width: 768px) {
  .site-header .header-inner { padding: 0 40px; }
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
  h3 { font-size: 20px; }
  .section { padding: 90px 0; }
  .mobile-break { display: none; }
}

@media (max-width: 767px) {
  .concern-grid {
    display: flex; overflow-x: auto; gap: 16px; scroll-snap-type: x mandatory;
    -ms-overflow-style: none; scrollbar-width: none;
  }
  .concern-grid::-webkit-scrollbar { display: none; }
  .concern-grid .concern-card { flex: 0 0 100%; width: 100%; scroll-snap-align: center; }
  .concern-dots { display: flex; }
  .process-timeline { gap: 4px; }
  .process-step .num { width: 36px; height: 36px; font-size: 13px; margin-bottom: 12px; }
  .process-timeline::before { top: 18px; }
  .process-step h3 { font-size: 15px; }
  .process-step p { font-size: 13px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .portfolio-card .card-title { opacity: 1; transform: none; }
}
