:root {
  --bg: #F9F9F9;
  --bg-sub: #DBDBDB;
  --accent: #455A64;
  --accent-sub: #B71C1C;
  --text: #1C1C1C;
  --header-h: 64px;
  --side-pad: 24px;
  --section-gap: 50px;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
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: 29px; }
h2 { font-size: 22px; }
h3, h4 { font-size: 18px; }
p { margin: 0 0 1em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--side-pad); }
section { padding: var(--section-gap) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  border: 2px solid var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); }
.cta-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease;
}
.site-header.is-scrolled {
  background: var(--bg);
  border-bottom-color: var(--bg-sub);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--side-pad);
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-mark { border-radius: 6px; }
.logo-text { font-weight: 800; font-size: 18px; color: var(--accent); }
.nav-pc { display: none; align-items: center; gap: 28px; font-weight: 600; }
.nav-pc a { padding: 8px 0; }
.nav-pc .nav-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
}
.hamburger {
  width: 44px; height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: none; cursor: pointer;
}
.hamburger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-menu {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  background: var(--bg);
  transition: max-height .3s ease;
}
.mobile-menu.is-open { max-height: 300px; border-top: 1px solid var(--bg-sub); }
.mobile-menu a {
  padding: 14px var(--side-pad);
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  border-bottom: 1px solid var(--bg-sub);
}

@media (min-width: 1024px) {
  .nav-pc { display: flex; }
  .hamburger { display: none; }
  .mobile-menu { display: none; }
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
  h3, h4 { font-size: 20px; }
  :root { --section-gap: 90px; --side-pad: 24px; }
}

/* ---------- Hero (Venetian blind reveal) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  --slat-count: 5;
  /* 첫 이미지를 정적 배경으로 즉시 표시 — JS 슬랫 애니메이션이 뜨기 전까지 빈 배경색(회색)이 보이는 것을 방지 */
  background-size: cover;
  background-position: center;
}
@media (min-width: 1024px) { .hero { --slat-count: 9; align-items: flex-end; } }
/* z-index를 지정해 새 스태킹 컨텍스트를 만든다 — 슬라이드가 순환하며 커지는 내부 z-index(1,2,3…)가
   hero-content(z-index:2) 위로 새어나가 H1을 덮어버리는 것을 막기 위함 */
.hero-stage { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
}
.hero-slide .slat {
  position: absolute;
  left: 0; right: 0;
  clip-path: inset(0 0 100% 0);
  transition-duration: .65s;
  transition-timing-function: cubic-bezier(.24,.43,.15,.97);
}
.hero-overlay {
  position: absolute; inset: 0;
  z-index: 1;
  /* 상단은 원본 그대로, 하단으로 갈수록 어두워져 텍스트 가독성 확보 */
  background: linear-gradient(180deg, rgba(28,28,28,0) 0%, rgba(28,28,28,.68) 100%);
}
@media (max-width: 1023px) { .hero-overlay { display: none; } }
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--side-pad) 56px;
  width: 100%;
}
@media (min-width: 1024px) { .hero-content { max-width: 1200px; margin: 0 auto; padding: 0 24px 88px; } }
.hero-content h1 { color: #fff; margin-bottom: 16px; }
.hero-content .lead { color: #fff; font-size: 17px; margin-bottom: 24px; max-width: 42em; }

/* ---------- Fade-in on scroll ---------- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.is-visible { opacity: 1; transform: none; }

/* ---------- Section heading ---------- */
.section-head { margin-bottom: 32px; }
.section-head h2 { margin-bottom: 8px; }
.section-head .sub { color: var(--accent); font-weight: 400; font-size: 16px; }

/* ---------- Grid cards (cases / services) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

.media-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
.media-card .thumb {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
}
.media-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.media-card .body { padding: 16px; }
.media-card .body h3 { margin-bottom: 8px; }
.media-card .body p { font-size: 15px; color: var(--text); margin-bottom: 0; }

/* 서비스 카드: 클릭 가능 + 호버 확대 + 링크 인디케이터 */
a.media-card.service-card:hover .thumb img { transform: scale(1.06); }
.service-card .thumb .link-indicator {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(249,249,249,.92);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.service-card .thumb .link-indicator svg { width: 18px; height: 18px; }

/* 시공사례 카드: 클릭 불가 */
.case-card { cursor: default; }

/* ---------- Pain points / About strengths cards ---------- */
.swipe-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.swipe-track::-webkit-scrollbar { display: none; }
.swipe-track > * { flex: 0 0 100%; scroll-snap-align: start; }
.swipe-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.swipe-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-sub); }
.swipe-dots span.is-active { background: var(--accent); }

@media (min-width: 1024px) {
  .swipe-track { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .about .swipe-track { grid-template-columns: repeat(3, 1fr); }
  .swipe-track > * { flex: none; }
  .swipe-dots { display: none; }
}

.info-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  height: 100%;
}
.info-card .icon {
  width: 24px; height: 24px;
  color: var(--accent);
  margin-bottom: 16px;
}
.info-card h3 { margin-bottom: 10px; }
.info-card p { font-size: 15px; margin-bottom: 0; }

/* ---------- Video ---------- */
.fullwidth-video { width: 100%; }
.fullwidth-video video { width: 100%; display: block; }

/* ---------- FAQ ---------- */
.faq-item {
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 18px var(--side-pad);
  min-height: 44px;
  background: transparent;
  border: none;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text);
}
.faq-q .mark { color: var(--accent); flex-shrink: 0; transition: transform .25s ease; }
.faq-item.is-open .faq-q .mark { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  padding: 0 var(--side-pad);
}
.faq-item.is-open .faq-a { max-height: 400px; padding-bottom: 18px; }
.faq-a p { font-size: 15px; margin-bottom: 0; }

/* ---------- Consult CTA / partner links / footer ---------- */
.consult-cta { background: var(--bg-sub); text-align: center; }
.consult-cta h2 { margin-bottom: 8px; }
.consult-cta .sub { margin-bottom: 24px; }
.consult-cta .cta-group { justify-content: center; }

.partner-links {
  text-align: center;
  padding: 24px var(--side-pad);
  font-size: 14px;
  color: var(--text);
}
.partner-links a { opacity: .75; }
.partner-links .sep { margin: 0 12px; color: var(--bg-sub); }

.site-footer { background: var(--accent); color: #fff; }
.footer-inner {
  padding: 32px var(--side-pad);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer-info p { margin-bottom: 4px; font-size: 14px; opacity: .9; }
.footer-nav { display: flex; gap: 20px; font-size: 14px; font-weight: 600; }
@media (min-width: 1024px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ---------- Detail pages (case / service) ---------- */
.detail-hero {
  padding-top: calc(var(--header-h) + 40px);
  background: #fff;
}
.kicker {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.detail-body { padding: var(--section-gap) 0; }
.detail-body h2 { margin: 40px 0 16px; }
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { font-size: 16px; }
.detail-img {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 5 / 4;
  margin: 24px 0;
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-list { display: grid; gap: 16px; margin: 24px 0; }
@media (min-width: 640px) { .detail-list { grid-template-columns: repeat(2, 1fr); } }
.detail-list .info-card p { color: var(--text); }
.area-note { background: var(--bg-sub); border-radius: var(--radius); padding: 20px; margin: 24px 0; }

/* ---------- Sitemap page ---------- */
.sitemap-group { margin-bottom: 32px; }
.sitemap-group h2 { margin-bottom: 16px; }
.sitemap-links { display: grid; gap: 10px; }
@media (min-width: 640px) { .sitemap-links { grid-template-columns: repeat(2, 1fr); } }
.sitemap-links a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #fff;
  border-radius: var(--radius);
  font-weight: 600;
}

/* ---------- Contact page ---------- */
.contact-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-top: 24px;
}
.contact-row { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--bg-sub); }
.contact-row:last-child { border-bottom: none; }
.contact-row .label { width: 88px; flex-shrink: 0; font-weight: 700; color: var(--accent); }

/* ---------- Home top spacing (fixed header offset) ---------- */
main { display: block; }
