@font-face {
  font-family: "Pretendard";
  src: url("assets/font/PretendardVariable-subset.woff") format("woff-variations"),
       url("assets/font/PretendardVariable-subset.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #14213d;
  --muted: #55607a;
  --brand: #1c3664;
  --brand-dark: #12264a;
  --accent: #e8b64c;
  --line: #e1e6ef;
  --soft: #f3f5f9;
  --deep: #0f1f3a;
  --max: 75rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Pretendard", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 30; }
.skip:focus { left: 1rem; top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.5rem;
  background: var(--brand); color: #fff;
  border: 2px solid var(--brand); border-radius: 4px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .85); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-small { min-height: 2.5rem; padding: 0 1.1rem; font-size: .95rem; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 2rem; min-height: 4rem; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; height: 1.45rem; width: auto; color: #000; }
.nav { display: flex; gap: 1.75rem; margin-left: auto; }
.nav a { text-decoration: none; font-size: .95rem; font-weight: 600; color: var(--ink); }
.nav a:hover { color: var(--brand); }

/* 첫 화면: 공장 영상 배경 */
.hero { position: relative; display: flex; align-items: center; min-height: clamp(28rem, 74vh, 42rem); overflow: hidden; background: var(--deep); color: #fff; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 18, 36, .9) 0%, rgba(9, 18, 36, .62) 48%, rgba(9, 18, 36, .2) 100%); }
.hero-inner { position: relative; z-index: 1; padding-top: 3rem; padding-bottom: 3rem; }
.hero-tags { font-size: .95rem; font-weight: 600; letter-spacing: .04em; color: var(--accent); }
.hero h1 { margin-top: .9rem; font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.04em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-slides { display: grid; overflow: hidden; }
.hero-slide { grid-area: 1 / 1; transform: translateX(105%); opacity: 0; transition: transform .7s ease, opacity .7s ease; }
.hero-slide.is-on { transform: none; opacity: 1; }
.hero-slide.is-out { transform: translateX(-105%); }
.hero-dots { display: flex; gap: .45rem; margin-top: 1rem; }
.hero-dots span { width: 1.6rem; height: 3px; background: rgba(255, 255, 255, .35); transition: background .3s; }
.hero-dots span.is-on { background: var(--accent); }
.hero-lead { max-width: 32rem; margin-top: 1.1rem; font-size: 1.15rem; color: rgba(255, 255, 255, .88); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; }
.video-toggle {
  position: absolute; right: var(--gutter); bottom: 1.25rem; z-index: 2;
  min-height: 2.4rem; padding: 0 1rem;
  background: rgba(9, 18, 36, .7); color: #fff; border: 1px solid rgba(255, 255, 255, .35); border-radius: 4px;
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.video-toggle:hover { background: rgba(9, 18, 36, .9); }

/* 숫자 줄 */
.stats { background: var(--deep); color: #fff; }
.stats-list { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 0; margin-bottom: 0; }
.stats-list > div { display: flex; flex-direction: column-reverse; padding: 1.6rem 1rem; text-align: center; }
.stats-list > div + div { border-left: 1px solid rgba(255, 255, 255, .14); }
.stats-list dt { font-size: .92rem; color: rgba(255, 255, 255, .7); }
.stats-list dd { margin: 0 0 .2rem; font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* 절 제목 공통 */
.section-title { text-align: center; max-width: 42rem; margin: 0 auto clamp(2rem, 4vw, 3rem); }
.section-title h2, .film h2, .range h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.03em; }
.section-title p { margin-top: .6rem; color: var(--muted); }

/* 단가 */
.price { padding-top: clamp(4rem, 7vw, 6rem); padding-bottom: clamp(4rem, 7vw, 6rem); }
.route { display: grid; gap: .9rem; max-width: 56rem; margin: 0 auto; }
.route-row { display: grid; grid-template-columns: 11rem 1fr; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: 6px; }
.route-ours { border-color: var(--brand); background: var(--soft); }
.route-label { font-weight: 700; color: var(--muted); }
.route-ours .route-label { color: var(--brand); }
.route-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.route-steps li { padding: .35rem .8rem; border-radius: 3px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .95rem; }
.route-steps li + li::before { content: "→"; margin-right: .4rem; margin-left: -.1rem; color: var(--muted); }
.route-ours .route-steps li { border-color: var(--brand); color: var(--brand); }
.price-points { list-style: none; margin: 2rem auto 0; padding: 0; max-width: 56rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.price-points li { padding-top: 1rem; border-top: 3px solid var(--brand); }
.price-points h3 { font-size: 1.1rem; font-weight: 800; }
.price-points p { margin-top: .35rem; font-size: .95rem; color: var(--muted); }

/* 전문성 */
.expertise { background: var(--soft); padding: clamp(4rem, 7vw, 6rem) 0; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.pillars li { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; padding-bottom: 1.3rem; }
.pillars img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pillars h3 { padding: 1.1rem 1.2rem 0; font-size: 1.1rem; font-weight: 800; }
.pillars p { padding: .35rem 1.2rem 0; font-size: .95rem; color: var(--muted); }

/* 공장 영상 */
.film { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-top: clamp(4rem, 7vw, 6rem); padding-bottom: clamp(4rem, 7vw, 6rem); }
.film-text p { margin-top: 1rem; color: var(--muted); max-width: 34rem; }
.film-video video, .video-play { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: var(--deep); }
.video-play { position: relative; display: block; padding: 0; border: 0; overflow: hidden; cursor: pointer; }
.video-play img { width: 100%; height: 100%; object-fit: cover; }
.play-icon { position: absolute; left: 50%; top: 50%; width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem; border-radius: 50%; background: var(--brand); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.play-icon::after { content: ""; position: absolute; left: 1.85rem; top: 1.35rem; border-style: solid; border-width: .9rem 0 .9rem 1.4rem; border-color: transparent transparent transparent #fff; }
.video-play:hover .play-icon { background: var(--brand-dark); }
.video-len { position: absolute; left: .9rem; bottom: .8rem; padding: .2rem .65rem; border-radius: 3px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .85rem; font-weight: 600; }

/* 제작 사례 */
.cases { background: var(--deep); color: #fff; padding: clamp(4rem, 7vw, 6rem) 0; }
.cases .section-title p { color: rgba(255, 255, 255, .7); }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.case { padding: 1.6rem 1.5rem; border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; background: rgba(255, 255, 255, .04); }
.case h3 { font-size: 1.2rem; font-weight: 800; color: #fff; }
.case-items { margin-top: .6rem; font-weight: 700; color: var(--accent); }
.case-desc { margin-top: .5rem; color: rgba(255, 255, 255, .82); }

/* 품목 */
.range { background: var(--soft); }
.range-inner { padding-top: clamp(3.5rem, 6vw, 5rem); padding-bottom: clamp(3.5rem, 6vw, 5rem); text-align: center; }
.chips { list-style: none; margin: 1.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.chips li { padding: .65rem 1.3rem; border-radius: 4px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 1.02rem; }
.range-more { margin-top: 1.6rem; text-align: center; font-weight: 700; color: var(--muted); }
.chips-more { margin-top: .8rem; }
.chips-more li { font-weight: 600; }
.range-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 56rem; margin: 2rem auto 0; }
.range-specs > div { padding: 1rem; border-radius: 6px; background: #fff; }
.range-specs dt { font-size: .9rem; font-weight: 700; color: var(--brand); }
.range-specs dd { margin: .2rem 0 0; }

/* 제작 과정 */
.process { padding-top: clamp(4rem, 7vw, 6rem); padding-bottom: clamp(4rem, 7vw, 6rem); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.steps li { counter-increment: step; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.steps img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.steps li > div { flex: 1; padding: 1.1rem 1.2rem 1.4rem; }
.steps h3 { font-size: 1.12rem; font-weight: 800; }
.steps h3::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: .2rem; font-size: .85rem; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.steps p { margin-top: .4rem; font-size: .95rem; color: var(--muted); }

/* 생산 라인 */
.workshop { background: var(--soft); padding: clamp(4rem, 7vw, 6rem) 0; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery li { position: relative; border-radius: 6px; overflow: hidden; background: var(--deep); }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1rem .75rem; background: linear-gradient(transparent, rgba(9, 18, 36, .85)); color: #fff; font-weight: 700; font-size: .98rem; }

/* 문의부터 출고까지 */
.flow { padding-top: clamp(4rem, 7vw, 6rem); padding-bottom: clamp(4rem, 7vw, 6rem); }
.flow-list { list-style: none; margin: 0; padding: 0; counter-reset: flow; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.flow-list li { counter-increment: flow; position: relative; padding: 1.25rem 1rem 1.2rem; border: 1px solid var(--line); border-radius: 6px; text-align: center; }
.flow-list li::before { content: counter(flow); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin: 0 auto .7rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.flow-list h3 { font-size: 1.1rem; font-weight: 800; }
.flow-list p { margin-top: .4rem; font-size: .93rem; color: var(--muted); }

/* 자주 묻는 질문 */
.faq { background: var(--soft); padding: clamp(4rem, 7vw, 6rem) 0; }
.faq-inner { max-width: 52rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.faq details + details { margin-top: .7rem; }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.05rem 1.3rem; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.3rem; line-height: 1.2; color: var(--brand); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.3rem 1.2rem; color: var(--muted); }
.faq details ul { margin: 0; padding: 0 1.3rem .6rem 2.5rem; color: var(--muted); }
.faq details li + li { margin-top: .35rem; }

/* 문의 띠 */
.cta { position: relative; overflow: hidden; background: var(--deep); color: #fff; text-align: center; }
.cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta::after { content: ""; position: absolute; inset: 0; background: rgba(9, 18, 36, .68); }
.cta-inner { position: relative; z-index: 1; padding-top: clamp(4rem, 8vw, 6.5rem); padding-bottom: clamp(4rem, 8vw, 6.5rem); }
.cta h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
.cta p { margin-top: .8rem; color: rgba(255, 255, 255, .88); }
.cta .actions { justify-content: center; }

/* 바닥글 */
.foot { background: var(--deep); color: rgba(255, 255, 255, .78); font-size: .95rem; }
.foot-inner { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2rem; padding-top: 3rem; padding-bottom: 3rem; }
.foot p + p { margin-top: .3rem; }
.foot-brand { margin-bottom: .6rem; color: #fff; }
.foot-logo { display: block; height: 1.6rem; width: auto; }
.foot-sub { margin-top: 1rem; font-weight: 700; color: #fff; }
.foot-head { margin-bottom: .6rem; font-weight: 700; color: #fff; }
.foot-nav { display: flex; flex-direction: column; gap: .3rem; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* 품목별 제작 페이지(tools/build_item_pages.py)와 품목 칩 링크 */
.item-head { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.crumbs { font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--brand); }
.item-head h1 { margin-top: .8rem; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.04em; }
.item-lead { max-width: 40rem; margin: 1rem 0 1.6rem; font-size: 1.1rem; color: var(--muted); }
.item-page .range-specs { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.item-more { margin-top: 1.5rem; text-align: center; color: var(--muted); }
.item-more a { color: var(--brand); font-weight: 700; }
.item-others { padding-top: clamp(3rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); text-align: center; }
.item-others h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.03em; }
.chips a { display: block; margin: -.65rem -1.3rem; padding: .65rem 1.3rem; color: inherit; text-decoration: none; }
.chips li:has(a):hover { border-color: var(--brand); }

/* 태블릿 */
@media (max-width: 960px) {
  .nav { display: none; }
  .top .btn-small { margin-left: auto; }
  .film { grid-template-columns: 1fr; }
  .stats-list { grid-template-columns: repeat(2, 1fr); }
  .stats-list > div:nth-child(3) { border-left: 0; }
  .stats-list > div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .14); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .flow-list { grid-template-columns: repeat(3, 1fr); }
  .range-specs { grid-template-columns: 1fr; max-width: 30rem; }
  .price-points { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}

/* 휴대폰 */
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .hero { min-height: 32rem; }
  .hero::after { background: linear-gradient(180deg, rgba(9, 18, 36, .5) 0%, rgba(9, 18, 36, .9) 100%); }
  .route-row { grid-template-columns: 1fr; gap: .5rem; }
  .pillars { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .gallery-cap { padding: 1.4rem .6rem .5rem; font-size: .85rem; }
  .flow-list { grid-template-columns: 1fr 1fr; }
  .foot-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slide { transition: none; }
}

/* 사진 크게 보기: 누르면 검은 바탕 위에 화면 가득, ✕·Esc·사진 바깥을 누르면 닫힌다(아튼다 공장 소개와 같은 동작) */
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: zoom-in; }
.zoom:hover img { opacity: .92; }
.zoom:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.zoom-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; }
.zoom-dialog::backdrop { background: rgba(0, 0, 0, .9); }
.zoom-figure { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; height: 100%; margin: 0; padding: 4rem 1rem; }
.zoom-img { display: block; max-width: min(100%, 1200px); max-height: calc(100dvh - 13rem); width: auto; height: auto; border-radius: 4px; }
.zoom-figure figcaption { max-width: 40rem; text-align: center; }
.zoom-title { font-size: 1.1rem; font-weight: 700; }
.zoom-desc { margin-top: .35rem; color: rgba(255, 255, 255, .85); }
.zoom-close { position: absolute; top: 1rem; right: 1rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer; }
.zoom-close:hover { background: rgba(255, 255, 255, .25); }
