@charset "utf-8";
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");

/* ============================================================
   ㈜명문공조 — 디자인 시스템
   ============================================================ */

:root {
  /* 브랜드 — 로고 네이비 + 라이트블루 */
  --navy-900: #0a1f3d;
  --navy-800: #0f2c5c;
  --navy-700: #16407f;
  --navy-600: #1d54a6;
  --sky-500:  #4a9fd8;
  --sky-400:  #6fb6e0;
  --sky-100:  #e7f2fa;

  /* 중립 — 단계는 900/700/500/200/100/50 뿐이다.
     400·300 은 없다. 보조 텍스트는 --ink-500, 옅은 선·면은 --ink-200 을 쓴다. */
  --ink-900: #14181f;
  --ink-700: #3c4552;
  --ink-500: #66707c;
  --ink-200: #dde2e8;
  --ink-100: #eef1f5;
  --ink-50:  #f6f8fa;
  --white:   #ffffff;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Malgun Gothic", system-ui, sans-serif;

  --wrap: 1200px;
  --gut: 24px;
  --header-h: 76px;

  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(10, 31, 61, .08);
  --shadow-md: 0 8px 24px rgba(10, 31, 61, .10);
  --shadow-lg: 0 20px 48px rgba(10, 31, 61, .14);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 리셋 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-900);
  background: var(--white);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { list-style: none; padding: 0; }

/* ---------- 유틸 ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tint { background: var(--ink-50); }

:focus-visible { outline: 2px solid var(--navy-600); outline-offset: 3px; }

.eyebrow {
  display: block;
  font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--navy-600);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800; line-height: 1.3; letter-spacing: -.02em;
}
.section-lead {
  margin-top: 16px; font-size: clamp(15px, 1.5vw, 17px);
  color: var(--ink-500); line-height: 1.8;
}
.section-head { max-width: 720px; }
.section-head--center { margin-inline: auto; text-align: center; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 54px; padding-inline: 30px;
  border-radius: var(--radius);
  font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  transition: all .25s var(--ease);
  white-space: nowrap;
  max-width: 100%;
}
/* 좁은 화면에서 긴 라벨 버튼이 화면 밖으로 밀려 가로 스크롤이 생기던 것 차단 */
@media (max-width: 520px) {
  .btn {
    white-space: normal; text-align: center;
    height: auto; min-height: 54px; padding-block: 13px; padding-inline: 20px;
    line-height: 1.35;
  }
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--navy-800); color: var(--white); }
.btn--primary:hover { background: var(--navy-700); box-shadow: var(--shadow-md); }
.btn--ghost { border: 1.5px solid var(--ink-200); color: var(--ink-900); background: var(--white); }
.btn--ghost:hover { border-color: var(--navy-800); color: var(--navy-800); }
.btn--onDark { border: 1.5px solid rgba(255,255,255,.5); color: var(--white); }
.btn--onDark:hover { background: var(--white); color: var(--navy-900); border-color: var(--white); }

/* ============================================================
   헤더
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--ink-100);
}
.header__inner { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.header__logo img { height: 30px; width: auto; }
.gnb { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.gnb__link {
  display: block; padding: 10px 20px;
  font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  color: var(--ink-700); border-radius: var(--radius);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.gnb__link:hover, .gnb__link[aria-current="page"] { color: var(--navy-800); background: var(--sky-100); }
/* 삼성 파트너 표기 — 흰 배경 PNG를 그대로 얹으면 다크 헤더에서 회색 박스로 보인다.
   라벨은 텍스트, 워드마크는 흰색 단색(삼성 CI 허용 표현)으로 분리한다. */
.header__partner {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
  padding-left: 18px; margin-left: 4px;
  border-left: 1px solid rgba(127, 184, 232, .22);
}
.header__partner-label {
  font-size: 10px; font-weight: 600; letter-spacing: .06em;
  color: rgba(195, 210, 226, .72); white-space: nowrap;
}
.header__partner img { height: 15px; width: auto; opacity: .92; }

.nav-toggle { display: none; width: 44px; height: 44px; margin-left: auto;
              align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink-900);
                   position: relative; transition: background .2s; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px;
  background: var(--ink-900); transition: transform .25s var(--ease);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   히어로
   ============================================================ */
.hero { position: relative; overflow: hidden; background: var(--ink-50); }
.hero__slides { position: relative; height: clamp(460px, 62vw, 640px); }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center right;
  opacity: 0; transition: opacity 1.1s var(--ease);
}
.hero__slide.is-active { opacity: 1; }
.hero__slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.88) 32%, rgba(255,255,255,.2) 58%, rgba(255,255,255,0) 78%);
}
.hero__body { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; }
.hero__copy { max-width: 620px; }
.hero__kicker { font-size: 14px; font-weight: 700; letter-spacing: .1em;
                color: var(--sky-500); margin-bottom: 18px; }
.hero__title {
  font-size: clamp(32px, 5vw, 56px); font-weight: 800;
  line-height: 1.24; letter-spacing: -.03em; color: var(--navy-900);
}
.hero__title em { font-style: normal; color: var(--navy-600); }
.hero__text { margin-top: 20px; font-size: clamp(15px, 1.6vw, 18px);
              color: var(--ink-700); line-height: 1.75; }
.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero__dots {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 28px; z-index: 3;
  width: 100%; max-width: var(--wrap); padding-inline: var(--gut);
  display: flex; gap: 10px;
}
.hero__dot { width: 36px; height: 3px; background: rgba(15,44,92,.2);
             border-radius: 2px; transition: background .3s var(--ease); }
.hero__dot.is-active { background: var(--navy-800); }

/* ============================================================
   신뢰 지표
   ============================================================ */
.facts { border-bottom: 1px solid var(--ink-100); background: var(--white); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); padding-block: 40px; }
.fact { text-align: center; padding-inline: 16px; position: relative; }
.fact + .fact::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 44px; background: var(--ink-100);
}
.fact__num { font-size: clamp(24px, 2.8vw, 34px); font-weight: 800;
             color: var(--navy-800); letter-spacing: -.02em; line-height: 1.2; }
.fact__num small { font-size: .6em; font-weight: 700; margin-left: 2px; }
.fact__label { margin-top: 6px; font-size: 14px; color: var(--ink-500); font-weight: 500; }

/* ============================================================
   소개
   ============================================================ */
.intro__grid { display: grid; grid-template-columns: 1fr 1.15fr;
               gap: clamp(40px, 6vw, 88px); align-items: center; }
.intro__visual { position: relative; }
.intro__visual img { width: 100%; max-width: 420px; margin-inline: auto; }
.intro__points { margin-top: 32px; display: grid; gap: 18px; }
.intro__point { display: flex; gap: 14px; align-items: flex-start; }
.intro__point svg { width: 22px; height: 22px; flex: none; color: var(--sky-500); margin-top: 3px; }
.intro__point b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.intro__point span { display: block; margin-top: 4px; font-size: 15px; color: var(--ink-500); line-height: 1.7; }

/* ============================================================
   사업영역
   ============================================================ */
.biz__grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.biz-card {
  background: var(--white); border: 1px solid var(--ink-100);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.biz-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.biz-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-100); }
.biz-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.biz-card:hover .biz-card__media img { transform: scale(1.06); }
.biz-card__body { padding: 30px 28px 32px; display: flex; flex-direction: column; flex: 1; }
.biz-card__tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--sky-500); background: var(--sky-100);
  padding: 5px 10px; border-radius: 3px; margin-bottom: 14px;
}
.biz-card__title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.4; }
.biz-card__text { margin-top: 12px; font-size: 15px; color: var(--ink-500); line-height: 1.75; flex: 1; }
.biz-card__more { margin-top: 22px; display: inline-flex; align-items: center; gap: 8px;
                  font-size: 15px; font-weight: 700; color: var(--navy-800); }
.biz-card__more svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.biz-card:hover .biz-card__more svg { transform: translateX(4px); }

/* ============================================================
   시공사례
   ============================================================ */
.works__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.works__grid { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.work { position: relative; overflow: hidden; border-radius: var(--radius);
        aspect-ratio: 4 / 3; background: var(--ink-200); display: block; }
.work--wide { grid-column: span 2; aspect-ratio: 8 / 3; }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.work:hover img { transform: scale(1.07); }
.work__veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,31,61,.86) 0%, rgba(10,31,61,.28) 45%, rgba(10,31,61,0) 75%);
  opacity: .92; transition: opacity .35s var(--ease);
}
.work:hover .work__veil { opacity: 1; }
.work__cap { position: absolute; left: 22px; right: 22px; bottom: 20px; color: var(--white); }
.work__sector {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  padding: 4px 9px; border-radius: 3px; margin-bottom: 9px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.24);
}
.work__name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.4; }

/* ============================================================
   CTA
   ============================================================ */
.cta { position: relative; overflow: hidden; }
.cta__bg { position: absolute; inset: 0; }
.cta__bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.cta__bg::after { content: ""; position: absolute; inset: 0; background: rgba(10,31,61,.84); }
.cta__inner { position: relative; z-index: 2; text-align: center; color: var(--white);
              padding-block: clamp(72px, 10vw, 120px); }
.cta__title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -.025em; line-height: 1.3; }
.cta__text { margin-top: 18px; font-size: clamp(15px, 1.6vw, 17px); color: rgba(255,255,255,.78); line-height: 1.8; }
.cta__phone { margin-top: 34px; display: inline-flex; align-items: center; gap: 12px;
              font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.cta__phone svg { width: 26px; height: 26px; color: var(--sky-400); }
.cta__hours { margin-top: 10px; font-size: 14px; color: rgba(255,255,255,.6); }
.cta__actions { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   푸터
   ============================================================ */
.footer { background: var(--navy-900); color: rgba(255,255,255,.68); font-size: 14px; }
.footer__top { padding-block: 64px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand img { width: auto; }
.footer__tel { margin-top: 26px; }
.footer__tel dt { font-size: 13px; color: rgba(255,255,255,.45); }
.footer__tel dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; color: var(--white); letter-spacing: -.01em; }
.footer__tel dd + dd { font-size: 18px; font-weight: 700; color: rgba(255,255,255,.8); }
.footer__colTitle { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
                    color: var(--white); margin-bottom: 18px; }
.footer__list li + li { margin-top: 11px; }
.footer__list a { transition: color .2s var(--ease); }
.footer__list a:hover { color: var(--white); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 28px;
                  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
@media (min-width: 769px) { .footer__bottom { padding-right: 200px; } }
@media (max-width: 768px) { .footer__bottom { padding-right: 64px; } }
.footer__legal { font-size: 13px; line-height: 1.9; color: rgba(255,255,255,.5); }
.footer__legal span { display: inline-block; margin-right: 14px; }
.footer__legal a:hover { color: rgba(255,255,255,.8); }
.footer__policy { display: flex; gap: 18px; font-size: 13px; }
.footer__policy a:hover { color: var(--white); }

/* 맨 위로 */
.totop {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy-800); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .3s var(--ease);
}
.totop.is-shown { opacity: 1; visibility: visible; transform: none; }
.totop:hover { background: var(--navy-700); }
.totop svg { width: 20px; height: 20px; }

/* 카카오 채널 상담 — 맨위로 버튼 바로 위에 쌓는다.
   .totop 은 스크롤 900px 이후에만 뜨지만 상담 버튼은 항상 보여야 하므로 별도 규칙. */
.kakao {
  position: fixed; right: 24px; bottom: 82px; z-index: 90;
  display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 18px 0 14px; border-radius: 100px;
  background: #FEE500; color: #191600;
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: var(--shadow-md);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.kakao:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(10, 31, 61, .18); }
.kakao svg { width: 22px; height: 22px; flex: none; }
.kakao__label { white-space: nowrap; }
/* 768px 이하에는 하단 고정 CTA 바(.mcta, 약 74px)가 깔린다.
   두 버튼을 그 위로 올려야 바에 가리지 않는다. */
@media (max-width: 768px) {
  .kakao { bottom: 146px; }
  .totop { bottom: 88px; }
  /* 폼이 화면에 있는 동안(.is-formview, page.js) 원형 버튼 둘을 치운다 —
     375px 에서 입력란 오른쪽 64px 을 덮는다. 폼 안에는 카카오 링크가 따로 있다. */
  .is-formview .kakao, .is-formview .totop,
  .is-typing .kakao, .is-typing .totop { opacity: 0; visibility: hidden; pointer-events: none; }
}
@media (max-width: 600px) {
  /* 좁은 화면에서는 원형 아이콘만 — 본문을 가리지 않게 */
  .kakao { right: 18px; width: 48px; padding: 0; justify-content: center; }
  .kakao__label { display: none; }
  .totop { right: 18px; }
}
@media (prefers-reduced-motion: reduce) { .kakao { transition: none; } }

/* 스크롤 등장 — JS가 살아있을 때만 숨김 처리(실패해도 콘텐츠는 보인다) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 1080px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 44px; }
  .works__grid { grid-template-columns: repeat(2, 1fr); }
  .work--wide { grid-column: span 2; aspect-ratio: 16 / 7; }
}

@media (max-width: 1023px) {
  :root { --header-h: 64px; }
  .header__partner { display: none; }
  .gnb {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--ink-100);
    padding: 8px var(--gut) 20px; margin: 0;
    box-shadow: var(--shadow-md);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    /* visibility 는 애니메이션하지 않고 즉시 전환 — 닫힘 상태가 확실히 적용된다 */
    transition: transform .28s var(--ease), opacity .28s var(--ease), visibility 0s linear .28s;
  }
  .gnb.is-open {
    transform: none; opacity: 1; visibility: visible;
    transition: transform .28s var(--ease), opacity .28s var(--ease), visibility 0s;
  }
  .gnb__link { padding: 15px 8px; font-size: 17px; border-bottom: 1px solid var(--ink-100); border-radius: 0; }
  .nav-toggle { display: flex; }
  .intro__grid { grid-template-columns: 1fr; }
  .intro__visual { order: -1; max-width: 320px; margin-inline: auto; }
  .biz__grid { grid-template-columns: 1fr; gap: 20px; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); gap: 28px 0; padding-block: 32px; }
  .fact:nth-child(1)::before, .fact:nth-child(3)::before { display: none; }
}

@media (max-width: 620px) {
  :root { --gut: 20px; }
  .hero__slides { height: 520px; }
  .hero__slide { background-position: 72% center; }
  .hero__slide::after {
    background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 46%, rgba(255,255,255,.55) 72%, rgba(255,255,255,.35) 100%);
  }
  .hero__body { align-items: flex-start; padding-top: 56px; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
  .works__grid { grid-template-columns: 1fr; }
  .work--wide { grid-column: span 1; aspect-ratio: 4 / 3; }
  .footer__top { grid-template-columns: 1fr; gap: 36px; padding-block: 48px; }
  /* 하단 고정 CTA 바 위로 올린다 — bottom:16px 이면 바 뒤에 깔린다 */
  .totop { right: 16px; bottom: 88px; }
  .kakao { right: 16px; bottom: 146px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
