:root {
  --primary: #e8590c;
  --primary-dark: #c44a08;
  --dark: #15181d;
  --dark-2: #1f242b;
  --text: #222;
  --muted: #666;
  --line: #e3e5e8;
  --bg-alt: #f5f6f8;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  font-family: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text); background: #fff; line-height: 1.6; word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 760px; }

/* 버튼 */
.btn {
  display: inline-block; background: var(--primary); color: #fff; font-weight: 600;
  padding: 14px 28px; border-radius: var(--radius); border: 0; cursor: pointer;
  font-size: 16px; transition: background .2s;
}
.btn:hover { background: var(--primary-dark); }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--ghost { background: transparent; border: 1px solid rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }

/* 헤더 */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: 64px;
  background: rgba(21,24,29,.92); backdrop-filter: blur(8px); color: #fff;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.logo span { color: var(--primary); font-size: 12px; margin-left: 6px; letter-spacing: 2px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a:not(.btn):hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }

/* 히어로 */
.hero {
  min-height: 100vh; display: flex; align-items: center; color: #fff;
  background:
    radial-gradient(ellipse at 75% 40%, rgba(232,89,12,.35), transparent 55%),
    linear-gradient(135deg, #0e1014 0%, #1f242b 100%);
}
.hero__inner { padding-top: 64px; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.2; font-weight: 800; letter-spacing: -1px; }
.hero__sub { font-size: clamp(16px, 2vw, 20px); color: #c9cdd3; margin: 20px 0 36px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* 섹션 공통 */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--dark); color: #fff; }
.eyebrow { color: var(--primary); font-weight: 700; font-size: 13px; letter-spacing: 2px; margin-bottom: 8px; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.5px; margin-bottom: 16px; }
.lead { color: var(--muted); font-size: 17px; margin-bottom: 40px; }
.section--dark .lead { color: #aab0b8; }
.sub-title { font-size: 20px; margin: 56px 0 16px; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.stat { border-top: 3px solid var(--primary); padding-top: 16px; }
.stat strong { display: block; font-size: 32px; font-weight: 800; }
.stat span { color: var(--muted); }

.card { background: #fff; border-radius: var(--radius); padding: 32px 24px; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.card__icon { font-size: 28px; color: var(--primary); margin-bottom: 12px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: var(--dark-2); color: #fff; font-weight: 600; }

/* 이미지 자리 */
.ph {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(45deg, #e9ebee, #e9ebee 12px, #f1f2f4 12px, #f1f2f4 24px);
  color: #999; font-size: 14px; border-radius: var(--radius);
}
.ph--map { aspect-ratio: auto; min-height: 320px; }
.equip h3 { font-size: 18px; margin: 16px 0 4px; }
.equip p { color: var(--muted); font-size: 15px; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.work-feature { margin-bottom: 16px; }
.work-feature img { width: 100%; height: auto; border-radius: var(--radius); }
.gallery figure, .work-feature { margin: 0 0 16px; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.gallery a, .work-feature a { display: block; overflow: hidden; border-radius: var(--radius); }
.gallery img, .work-feature img { transition: transform .3s; }
.gallery a:hover img, .work-feature a:hover img { transform: scale(1.03); }

.process { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: s; }
.process li {
  background: var(--bg-alt); border-radius: var(--radius); padding: 24px 16px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.process b { color: var(--primary); font-size: 22px; }
.process span { font-weight: 700; font-size: 17px; }
.process small { color: var(--muted); }

/* 폼 */
.form { display: flex; flex-direction: column; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.form__row--3 { grid-template-columns: repeat(3, 1fr); }
.form label { display: block; font-size: 14px; font-weight: 600; color: #d6d9de; }
.form label > input, .form label > select, .form label > textarea { display: block; width: 100%; margin-top: 6px; }
.form label small { font-weight: 400; color: #8b929b; }
.form em { color: var(--primary); font-style: normal; }
.form input, .form select, .form textarea {
  height: 48px; min-width: 0;
  font: inherit; font-weight: 400; font-size: 15px; color: #fff;
  background: var(--dark-2); border: 1px solid #3a414b; border-radius: 8px; padding: 12px 14px;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
.form input[type="file"] { padding: 10px; }
.form .invalid { border-color: #ff6b6b; }
.form textarea { height: auto; resize: vertical; }
.form input[type="file"] { height: auto; }
.form .check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form .check input { width: 18px; height: 18px; margin: 0; padding: 0; flex: none; accent-color: var(--primary); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.privacy { font-size: 13px; color: #aab0b8; background: var(--dark-2); padding: 12px 14px; border-radius: 8px; }
.privacy summary { cursor: pointer; }
.privacy p { margin-top: 8px; }
.form__msg { min-height: 24px; text-align: center; font-weight: 600; }
.form__msg.ok { color: #51cf66; }
.form__msg.err { color: #ff6b6b; }

.info { list-style: none; display: flex; flex-direction: column; gap: 16px; font-size: 16px; }
.info b { display: inline-block; width: 80px; color: var(--primary); }

.footer { background: #0e1014; color: #8b929b; padding: 40px 0; font-size: 14px; }
.footer b { color: #fff; }
.footer .copy { margin-top: 12px; font-size: 13px; }

/* 반응형 */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3, .gallery { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--dark); padding: 8px 20px 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; }
  .nav .btn { text-align: center; margin-top: 8px; }
  .section { padding: 72px 0; }
  .grid--2, .grid--3, .form__row, .form__row--3 { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .grid--4, .gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat strong { font-size: 24px; }
}

/* 추가: 설비 스펙, 지도 */
.note { color: var(--muted); font-size: 14px; margin-top: 12px; }
.link { color: var(--primary); font-weight: 700; }
.equip-main { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.equip-main h3 { font-size: 24px; margin-bottom: 20px; }
.spec th { width: 40%; background: var(--bg-alt); color: var(--text); }
.spec td { font-weight: 700; font-size: 18px; }
.map { width: 100%; min-height: 340px; border: 0; border-radius: var(--radius); background: var(--bg-alt); }
.info a { color: var(--text); }
.map-links { display: flex; gap: 8px; }
.map-links .btn { color: #fff; }
@media (max-width: 760px) {
  .equip-main { grid-template-columns: 1fr; gap: 24px; }
}
.equip-main img { width: 100%; height: auto; }
.muted-row td { color: var(--muted); }

/* 히어로 배경 영상 */
.hero { position: relative; overflow: hidden; background: #0e1014; }
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(14,16,20,.85) 0%, rgba(14,16,20,.55) 55%, rgba(14,16,20,.25) 100%);
}
.hero__inner { position: relative; z-index: 2; }
@media (max-aspect-ratio: 4/5) {
  .hero::after { background: linear-gradient(180deg, rgba(14,16,20,.35) 0%, rgba(14,16,20,.8) 100%); }
  .hero { align-items: flex-end; padding-bottom: 80px; }
}

/* CAD 작업 안내 배너 */
.hero__sub strong { color: #fff; }
.cad-banner {
  display: flex; align-items: center; gap: 24px; margin-top: 32px;
  background: var(--dark); color: #fff; border-radius: var(--radius); padding: 28px 32px;
  border-left: 5px solid var(--primary);
}
.cad-banner__icon { font-size: 36px; color: var(--primary); flex: none; }
.cad-banner h3 { font-size: 20px; margin-bottom: 4px; }
.cad-banner p { color: #c9cdd3; }
.cad-banner .btn { margin-left: auto; flex: none; }
@media (max-width: 760px) {
  .cad-banner { flex-direction: column; align-items: flex-start; padding: 24px; }
  .cad-banner .btn { margin-left: 0; }
}

/* 작업사례: 사진 위 라벨 */
.work-feature { position: relative; }
.work-feature__cap {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 60px 28px 24px;
  border-radius: 0 0 var(--radius) var(--radius); pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(14,16,20,.85));
  color: #fff; display: flex; flex-direction: column; gap: 2px;
}
.work-feature__cap strong { font-size: clamp(32px, 5vw, 52px); font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
.work-feature__cap span:last-child { color: #d6d9de; font-size: 16px; }
.tag {
  align-self: flex-start; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .5px; margin-bottom: 6px;
}
.gallery a { position: relative; }
.chip {
  position: absolute; top: 12px; left: 12px; background: rgba(14,16,20,.8); color: #fff;
  font-weight: 800; font-size: 15px; padding: 6px 12px; border-radius: 8px; backdrop-filter: blur(4px);
}

/* 두께 스케일 */
.thick-scale { background: #fff; border-radius: var(--radius); padding: 24px 28px 20px; margin: 0 0 24px; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.thick-scale__title { font-weight: 700; margin-bottom: 16px; }
.thick-scale__title small { color: var(--muted); font-weight: 400; }
.thick-scale ul { list-style: none; display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; align-items: end; }
.thick-scale li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.thick-scale .bar {
  width: 100%; height: calc(var(--t) * 2px); border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #c3c8cf, #8a929c);
}
.thick-scale b { font-size: 14px; }
.thick-scale .is-max .bar { background: linear-gradient(180deg, #ff8a3d, var(--primary)); }
.thick-scale .is-max b { color: var(--primary); }
@media (max-width: 480px) {
  .thick-scale { padding: 20px 14px 16px; }
  .thick-scale ul { gap: 4px; }
  .thick-scale b { font-size: 11px; }
  .work-feature__cap { padding: 40px 16px 16px; }
}

/* 샘플 사진 위 두께 라벨 */
.pins { position: absolute; inset: 0; pointer-events: none; }
.pin {
  position: absolute; left: var(--x); top: 60%; transform: translateX(-50%);
  background: #fff; color: var(--dark); font-weight: 800; font-size: 13px;
  padding: 3px 8px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.4); white-space: nowrap;
}
.pin::before {
  content: ""; position: absolute; left: 50%; bottom: 100%; width: 2px; height: 26px;
  background: rgba(255,255,255,.8); transform: translateX(-50%);
}
.pin--max { background: var(--primary); color: #fff; }
.pin--max::before { background: var(--primary); }
@media (max-width: 760px) {
  .pins { display: none; }  /* 좁은 화면에서는 겹쳐서 숨기고 아래 두께 막대로 대체 */
}

/* 회사소개: 공장 전경 */
.factory { position: relative; margin: 48px 0 0; border-radius: var(--radius); overflow: hidden; }
.factory img { width: 100%; height: auto; display: block; }
.factory figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 40px 24px 18px;
  background: linear-gradient(180deg, transparent, rgba(14,16,20,.8));
  color: #fff; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.factory .tag { margin: 0; }
@media (max-width: 760px) {
  .factory img { aspect-ratio: 16 / 9; object-fit: cover; object-position: 35% 50%; }
  .factory figcaption { padding: 30px 14px 12px; font-size: 13px; }
}

/* 푸터 링크 */
.footer__links { margin-top: 12px; }
.footer__links a:hover { color: #fff; }

/* 개인정보처리방침 페이지 */
.doc { padding-top: 120px; }
.doc h1 { font-size: 32px; margin-bottom: 20px; }
.doc h2 { font-size: 20px; margin: 36px 0 12px; }
.doc p, .doc li { color: #444; }
.doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc .table { margin-top: 12px; }

/* 모바일 하단 고정 버튼 */
.mobile-cta { display: none; }
@media (max-width: 760px) {
  .mobile-cta {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding-bottom: env(safe-area-inset-bottom); background: var(--dark);
    box-shadow: 0 -4px 16px rgba(0,0,0,.25);
  }
  .mobile-cta a { display: flex; align-items: center; justify-content: center; height: 56px; font-weight: 700; font-size: 16px; color: #fff; }
  .mobile-cta__call { background: var(--dark-2); }
  .mobile-cta__quote { background: var(--primary); }
  body:not(.doc-page) { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}
