/* 기가테크 홈페이지
   색: 기계 도장 녹색 + 작업대 주황(옛 카탈로그 기계 사진의 두 색) · 바탕은 강판 회색 · 제품 사진 칸은 흰색
   글꼴: 제목 Black Han Sans(공장 간판 느낌) · 본문 IBM Plex Sans KR */
:root {
  --green: #1f5a3a;
  --green-deep: #123523;
  --orange: #f39020;
  --orange-deep: #d97706;
  --ink: #14241b;
  --muted: #56645c;
  --steel: #e9ecea;
  --line: #cdd4cf;
  --plate: #ffffff;
  --display: "Black Han Sans", "IBM Plex Sans KR", sans-serif;
  --body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --wrap: 1180px;
  --pad: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--steel);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }
/* hidden 속성은 display 를 정한 요소(카드, 버튼)에서도 숨겨야 한다. */
[hidden] { display: none !important; }
/* 초점 테두리: 밝은 바탕에서는 짙은 녹색, 녹색 바탕과 사진 보기에서는 주황(둘 다 대비 3:1 이상). */
:focus-visible { outline: 3px solid var(--green-deep); outline-offset: 2px; }
.hero :focus-visible, .phead :focus-visible, .dhead :focus-visible, .foot :focus-visible, .lb :focus-visible { outline-color: var(--orange); }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -999px; top: 0; background: var(--plate); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 10px 22px;
  font: 600 1rem/1.3 var(--body); text-decoration: none; text-align: center;
  border: 2px solid var(--ink); border-radius: 3px; cursor: pointer;
}
.btn--call { background: var(--orange); color: var(--ink); }
.btn--call:hover { background: var(--orange-deep); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--plate); }

/* 머리 */
.top { background: var(--plate); border-bottom: 2px solid var(--ink); }
.top__in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__en { font-family: var(--display); font-size: 1.6rem; letter-spacing: 0.06em; line-height: 1; }
.brand__ko { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; text-decoration: none; font-weight: 500; border-radius: 3px; }
.nav a:hover { background: var(--steel); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--green); }
.top__tel { display: flex; flex-direction: column; text-decoration: none; line-height: 1.2; text-align: right; }
.top__tel span { font-size: 0.78rem; color: var(--muted); }
.top__tel strong { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: 0.02em; }
.top__menu { display: none; }

/* 홈 첫 화면 */
.hero { background: var(--green); color: #fff; }
.hero__in { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(36px, 6vw, 72px); }
.hero h1 { font: 400 clamp(2.1rem, 5.1vw, 4.4rem)/1.14 var(--display); letter-spacing: -0.01em; }
.hero h1 span { display: block; white-space: nowrap; }
.hero__lead { margin-top: 20px; max-width: 30em; font-size: 1.08rem; color: #e3ede6; }
.hero__since { margin-top: 28px; font-family: var(--display); font-size: 1.05rem; letter-spacing: 0.08em; color: #b9d2c1; }
.hero__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 6px solid #fff; }
.find { margin-top: 28px; max-width: 520px; }
.find label { display: block; font-weight: 500; margin-bottom: 8px; }
.find__row { display: flex; }
.find input {
  flex: 1; min-width: 0; min-height: 56px; padding: 0 16px;
  font: 400 1.05rem var(--body); color: var(--ink);
  background: #fff; border: 2px solid var(--green-deep); border-right: 0; border-radius: 3px 0 0 3px;
}
.find button {
  min-height: 56px; padding: 0 22px; font: 600 1.05rem var(--body); color: var(--ink);
  background: var(--orange); border: 2px solid var(--green-deep); border-radius: 0 3px 3px 0; cursor: pointer;
}
.find button:hover { background: var(--orange-deep); }

/* 구역 공통 */
.sec { padding-block: clamp(44px, 7vw, 84px); }
.sec--plate { background: var(--plate); border-block: 1px solid var(--line); }
.sec__head { margin-bottom: 28px; }
.sec__head h2, .contact h2 { font: 400 clamp(1.7rem, 3.4vw, 2.4rem)/1.2 var(--display); }
.sec__head p { margin-top: 8px; color: var(--muted); }
.sec__more { margin-top: 28px; }

/* 가공별 분류 표 */
.cats { border-top: 2px solid var(--ink); background: var(--plate); }
.cat {
  display: grid; grid-template-columns: 11.5em 4em minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 14px 20px; text-decoration: none; border-bottom: 1px solid var(--line);
}
.cat:hover { background: #f6f8f6; }
.cat:hover .cat__name { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--orange); text-underline-offset: 5px; }
.cat__name { font: 400 1.5rem/1.2 var(--display); }
.cat__count { font-weight: 600; color: var(--green); }
.cat__list { color: var(--muted); font-size: 0.95rem; }
.cat__thumbs { display: flex; gap: 14px; }
.cat__thumbs img { width: 84px; height: 60px; object-fit: contain; }

/* 사진 */
.shots { display: grid; gap: 22px 18px; }
.shots--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shots--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block: clamp(28px, 5vw, 56px); }
.shot { display: block; background: #dfe3e0; }
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.shots figcaption { margin-top: 10px; font-weight: 600; font-size: 1.05rem; }

/* 중고 기계 요약(홈) */
.usedlist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.usedlist a { display: flex; gap: 16px; align-items: center; height: 100%; padding: 14px; background: var(--plate); border: 1px solid var(--line); text-decoration: none; }
.usedlist a:hover { border-color: var(--ink); }
.usedlist img { flex: none; width: 112px; height: 112px; object-fit: cover; }
.usedlist__text { min-width: 0; }
.usedlist__name { display: block; font-weight: 600; font-size: 1.1rem; }
.usedlist__desc { margin-top: 4px; font-size: 0.88rem; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 오시는 길 */
.contact { background: var(--plate); border-top: 2px solid var(--ink); padding-block: clamp(44px, 7vw, 84px); }
.contact__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.contact__addr { margin-top: 18px; font-size: 1.15rem; font-weight: 500; }
.contact__links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.contact__links a { font-weight: 600; color: var(--green); }
.contact__dl { margin-top: 26px; display: grid; grid-template-columns: 5em minmax(0, 1fr); row-gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; }
.contact__dl dt { color: var(--muted); }
.contact__dl a { font-weight: 600; text-decoration: none; }
.contact__dl a:hover { text-decoration: underline; }
.contact__map img { width: 100%; border: 1px solid var(--line); }

/* 안쪽 페이지 머리 */
.phead { background: var(--green); color: #fff; padding-block: clamp(32px, 5vw, 56px); }
.phead h1 { font: 400 clamp(2.2rem, 5vw, 3.4rem)/1.15 var(--display); }
.phead__lead { margin-top: 10px; color: #e3ede6; max-width: 40em; }
.phead .btn { margin-top: 20px; }
.phead .btn--line { border-color: #fff; color: #fff; }
.phead .btn--line:hover { background: #fff; color: var(--ink); }

/* 제품 찾기 */
.psearch { margin-top: 22px; max-width: 520px; }
.psearch label { display: block; font-weight: 500; margin-bottom: 8px; }
.psearch input { width: 100%; min-height: 56px; padding: 0 16px; font: 400 1.05rem var(--body); color: var(--ink); background: #fff; border: 2px solid var(--green-deep); border-radius: 3px; }
.psearch__status { min-height: 1.7em; margin-top: 8px; color: #e3ede6; }
.chips { position: sticky; top: 0; z-index: 10; background: var(--plate); border-bottom: 2px solid var(--ink); }
.chips__in { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 10px; }
.chips a { flex: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 3px; text-decoration: none; font-weight: 500; white-space: nowrap; }
.chips a:hover { border-color: var(--ink); }
.chips a span { color: var(--green); font-weight: 600; margin-left: 2px; }
.plist { padding-block: 12px clamp(44px, 7vw, 84px); }
.pgroup { padding-top: 36px; }
.pgroup h2 { font: 400 1.9rem/1.2 var(--display); margin-bottom: 16px; }
.pgroup h2 span { font: 600 1rem var(--body); color: var(--green); margin-left: 8px; }
.pempty { margin-top: 40px; padding: 32px; background: var(--plate); border: 1px solid var(--line); }
.pempty p + p { margin-top: 16px; }

/* 제품 카드: 카탈로그 한 칸 */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.pcard { display: flex; flex-direction: column; padding: 16px 16px 18px; background: var(--plate); text-decoration: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pcard__img { display: flex; align-items: center; justify-content: center; height: 170px; margin-bottom: 14px; }
.pcard__img img { width: auto; max-width: 100%; max-height: 170px; object-fit: contain; }
.pcard__name { font-weight: 500; line-height: 1.4; }
.pcard__model { margin-top: 4px; font: 400 1.3rem/1.25 var(--display); letter-spacing: 0.02em; color: var(--green); }
.pcard:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.pcard:hover .pcard__model { color: var(--ink); }

/* 제품 상세 */
.dhead { background: var(--green); color: #fff; padding-block: clamp(24px, 4vw, 44px) clamp(28px, 5vw, 52px); }
.crumb { display: flex; gap: 10px; font-size: 0.95rem; color: #cfe0d5; }
.crumb a { text-decoration: underline; text-underline-offset: 3px; }
.dhead h1 { margin-top: 14px; font-weight: 400; }
.dhead__name { display: block; font: 600 clamp(1.25rem, 2.6vw, 1.7rem)/1.3 var(--body); }
.dhead__model { display: block; margin-top: 6px; font: 400 clamp(2.6rem, 8vw, 5.4rem)/1.05 var(--display); letter-spacing: 0.01em; }
.dhead__model--multi { font-size: clamp(1.9rem, 5vw, 3.4rem); line-height: 1.15; }
.dhead h1 > .dhead__name:only-child { font: 400 clamp(2.4rem, 6vw, 4rem)/1.1 var(--display); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 48px); align-items: start; padding-block: clamp(28px, 5vw, 56px); }
.detail__main { display: grid; gap: 20px; }
.plate { display: flex; justify-content: center; padding: clamp(20px, 4vw, 44px); background: var(--plate); border: 1px solid var(--line); }
.plate img { width: auto; max-width: 100%; }
.detail__text { padding: 18px 20px; background: var(--plate); border: 1px solid var(--line); }
.ask { position: sticky; top: 20px; display: grid; gap: 12px; padding: 22px; background: var(--plate); border: 2px solid var(--ink); }
.ask h2 { font: 400 1.4rem/1.2 var(--display); }
.ask__name { color: var(--muted); line-height: 1.45; }
.ask__fax { font-size: 0.95rem; color: var(--muted); }

/* 사양표 */
.spec { overflow-x: auto; background: var(--plate); border: 1px solid var(--line); border-top: 2px solid var(--ink); }
.spec table { width: 100%; border-collapse: collapse; font-size: 0.98rem; line-height: 1.55; }
.spec th, .spec td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.spec tr:last-child > * { border-bottom: 0; }
.spec th { font-weight: 600; background: #f3f5f3; }
.spec:not(.spec--3) td, .spec:not(.spec--3) th { min-width: 4.5em; }
.spec:not(.spec--3) th { white-space: nowrap; }
.spec td + td { border-left: 1px solid var(--line); }
.spec--3 th:first-child { width: 26%; }
.spec--3 .en { width: 32%; color: var(--muted); font-size: 0.9rem; }
.spec[tabindex]:focus-visible { outline-offset: -3px; }
.spec__hint { margin: 0 0 6px; font-size: 0.88rem; color: var(--muted); }
.js .spec__hint { display: none; } /* 스크립트가 돌면 실제로 넘치는 표에만 보인다(app.js 가 is-on 을 붙인다) */
.js .spec__hint.is-on { display: block; }
html:not(.js) .only-js, .js .no-js { display: none; } /* 스크립트가 있을 때와 없을 때 맞는 안내만 보인다 */
html:not(.js) .psearch, html:not(.js) .find { display: none; } /* 찾기는 스크립트로 돈다. 꺼져 있으면 동작하지 않는 입력칸을 보이지 않는다. */
.spec--3 td:last-child { font-weight: 500; }

.pager { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; padding-bottom: clamp(36px, 6vw, 64px); }
.pager a { padding: 14px 18px; background: var(--plate); border: 1px solid var(--line); text-decoration: none; font-weight: 500; line-height: 1.4; }
.pager a:hover { border-color: var(--ink); }
.pager a span { display: block; font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.pager__next { text-align: right; }
.pager__list { display: flex; align-items: center; }

/* 중고 기계 */
.used { padding-block: clamp(28px, 5vw, 56px); display: grid; gap: 28px; }
.uitem { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); padding: clamp(18px, 3vw, 28px); background: var(--plate); border: 1px solid var(--line); border-top: 2px solid var(--ink); }
.uitem h2 { font: 400 1.8rem/1.2 var(--display); }
.uitem ul { margin: 14px 0 20px; }
.uitem li { padding: 7px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.uitem .btn { width: 100%; margin-top: 8px; }
.uitem__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; align-content: start; }

/* 회사소개 */
.about { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 64px); padding-block: clamp(32px, 6vw, 72px); align-items: start; }
.about__greet p { font-size: 1.1rem; line-height: 1.9; max-width: 34em; }
.about__greet p + p { margin-top: 1.1em; }
.about__greet .about__sign { margin-top: 1.6em; font-weight: 600; }

/* 공지 */
.notices { padding-block: clamp(28px, 5vw, 56px); display: grid; gap: 22px; max-width: 860px; }
.notice { padding: clamp(18px, 3vw, 28px); background: var(--plate); border: 1px solid var(--line); border-top: 2px solid var(--ink); }
.notice h2 { font-size: 1.35rem; font-weight: 600; line-height: 1.4; }
.notice__date { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.notice img { margin-top: 16px; max-height: 560px; width: auto; }

/* 문의 */
.inq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 64px); padding-block: clamp(32px, 6vw, 72px); align-items: start; }
.inq h2 { font: 400 1.6rem/1.2 var(--display); margin-bottom: 14px; }
.inq__tel { display: block; white-space: nowrap; font: 400 clamp(2rem, 4.2vw, 2.9rem)/1.1 var(--display); color: var(--green); text-decoration: none; margin-bottom: 14px; }
.inq__direct p { margin-top: 6px; }
.inq__direct a { font-weight: 600; }
.inq__form { display: grid; gap: 16px; padding: clamp(18px, 3vw, 30px); background: var(--plate); border: 2px solid var(--ink); }
.inq__form h2 { margin-bottom: 0; }
.inq__form label { display: grid; gap: 6px; font-weight: 500; }
.inq__form input, .inq__form textarea { width: 100%; padding: 12px 14px; font: 400 1rem/1.5 var(--body); color: var(--ink); background: #fff; border: 1px solid #78857d; border-radius: 3px; }
.inq__form input { min-height: 50px; }
.inq__note { font-size: 0.93rem; color: var(--muted); line-height: 1.6; }
.inq__status { font-weight: 600; color: var(--green); }
.inq__status { min-height: 1.6em; margin: 0; }
.inq__out { display: grid; gap: 6px; }
.inq__out[hidden] { display: none; }
.inq__out textarea { background: #f3f5f3; }

/* 바닥 */
.foot { background: var(--green-deep); color: #d5e2da; padding-block: 44px 28px; font-size: 0.95rem; }
.foot__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.foot__brand { font: 400 1.5rem/1 var(--display); letter-spacing: 0.06em; color: #fff; margin-bottom: 12px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot__copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid #2c5a41; font-size: 0.85rem; color: #a9c0b2; }
.callbar { display: none; }

/* 사진 크게 보기 */
.lb { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(10, 20, 14, 0.94); color: #fff; }
.lb::backdrop { background: transparent; }
.lb__stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; padding: 56px 16px 20px; }
.lb__stage img { max-width: 100%; max-height: 100%; width: auto; margin: auto; object-fit: contain; }
.lb__cap { text-align: center; padding-top: 12px; font-weight: 500; }
.lb button { position: absolute; min-width: 52px; min-height: 52px; font: 600 1rem var(--body); color: #fff; background: rgba(10, 20, 14, 0.88); border: 1px solid rgba(255, 255, 255, 0.75); border-radius: 3px; cursor: pointer; }
.lb button:hover { background: #123523; }
.lb button:focus-visible { outline-offset: -5px; }
.lb__close { top: 10px; right: 12px; padding: 0 16px; }
.lb__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 12px; top: 50%; transform: translateY(-50%); }

/* 좁은 화면 */
@media (max-width: 980px) {
  .top__in { flex-wrap: wrap; gap: 0 12px; min-height: 60px; }
  .top__tel { display: none; }
  .js .top__menu { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font: 600 1rem var(--body); color: var(--ink); background: var(--plate); border: 2px solid var(--ink); border-radius: 3px; cursor: pointer; }
  .nav { flex-basis: 100%; flex-direction: column; gap: 0; padding-bottom: 10px; }
  .js .nav { display: none; }
  .js .nav.is-open { display: flex; }
  .nav a { padding: 13px 4px; border-top: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--green); padding-left: 14px; }
  .chips__in { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chips__in::-webkit-scrollbar { display: none; }
  .cat { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; }
  .cat__list { grid-column: 1 / -1; }
  .cat__thumbs { display: none; }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .ask { position: static; }
  .usedlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uitem { grid-template-columns: minmax(0, 1fr); }
  body { padding-bottom: 64px; }
  html { scroll-padding-bottom: 76px; }
  .callbar { position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr) auto; border-top: 2px solid var(--ink); }
  .callbar a { display: flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 18px; font-weight: 600; text-decoration: none; }
  .callbar__tel { background: var(--orange); color: var(--ink); font-size: 1.08rem; }
  .callbar__mail { background: var(--plate); color: var(--ink); border-left: 2px solid var(--ink); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero__in, .contact__in, .about, .inq, .foot__in { grid-template-columns: minmax(0, 1fr); }
  .hero__photo { order: -1; }
  .hero__photo img { border-width: 4px; }
  .shots--4, .shots--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .usedlist { grid-template-columns: minmax(0, 1fr); }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcard { padding: 12px 12px 14px; }
  .pcard__img { height: 120px; }
  .pcard__img img { max-height: 120px; }
  .pcard__model { font-size: 1.1rem; }
  .spec th, .spec td { padding: 9px 11px; }
  .spec--3 th:first-child { width: 30%; }
  .spec--3 .en { display: none; }
  .pager { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pager__list { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .find button { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .top__menu, .callbar, .chips, .ask .btn, .pager { display: none; } body { background: #fff; } }
