/* =========================================================
   TAEJIN GLOBAL — Bag Making Machine Homepage
   Design system + components + responsive layout
   ========================================================= */

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; }
ul { margin: 0; padding: 0; list-style: none; }

:root {
  /* Colors */
  --bg-dark: #0c1424;
  --bg-dark-2: #111a2e;
  --bg-light: #f5f6f8;
  --bg-card: #ffffff;
  --line: #e3e6ec;
  --text: #1a2030;
  --text-muted: #5a6275;
  --text-on-dark: #f1f3f7;
  --text-on-dark-muted: #98a1b3;
  --primary: #2870e0;
  --primary-2: #1a5cc7;
  --accent: #4a8ef5;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard",
               "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  --font-display: "Inter", var(--font-sans);

  /* Layout */
  --container: 1240px;
  --radius: 6px;
  --radius-lg: 12px;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: #fff;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
  background: #fff;
  border-radius: 4px;
  padding: 4px 8px;
}
.brand-tag { font-size: 11px; color: var(--text-on-dark-muted); display: block; letter-spacing: 0.5px; }

.nav-list {
  display: flex; gap: 4px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.6px;
}
.nav-list a {
  display: inline-block;
  padding: 8px 12px;
  color: var(--text-on-dark-muted);
  border-radius: 4px;
  transition: color .15s, background .15s;
  text-transform: uppercase;
}
.nav-list a:hover { color: var(--text-on-dark); background: rgba(255,255,255,0.05); }
.nav-list a.is-active { color: #fff; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: flex;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
}
.lang-switch a {
  padding: 4px 8px;
  color: var(--text-on-dark-muted);
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: color .15s, background .15s, border-color .15s;
}
.lang-switch a:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.lang-switch a.is-active {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
}

.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  color: #fff;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---- Hero ---- */
.hero {
  position: relative;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(40,112,224,0.18), transparent 55%);
  z-index: 0;
}
.hero .container {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  padding-top: 60px;
  padding-bottom: 60px;
  min-height: 480px;
}
.hero-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 2px;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.5px;
  font-weight: 800;
  margin: 0 0 20px;
}
.hero-desc {
  color: var(--text-on-dark-muted);
  max-width: 480px;
  margin: 0 0 28px;
  font-size: 15px;
}
.hero-image {
  position: relative;
}
.hero-image img {
  width: 100%;
  border-radius: var(--radius);
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.35));
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  border-radius: 4px;
  transition: background .15s, transform .15s;
  text-transform: uppercase;
}
.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover { background: var(--primary-2); }
.btn-outline {
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.08); }
.btn-arrow::after {
  content: ""; width: 14px; height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'><path d='M0 5h12M8 1l4 4-4 4' stroke='black' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'><path d='M0 5h12M8 1l4 4-4 4' stroke='black' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
}

/* ---- Section ---- */
.section {
  padding: 80px 0;
  background: var(--bg-light);
}
.section.is-light { background: #fff; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 20px; margin-bottom: 36px;
}
.section-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
}
.section-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  color: var(--primary); text-transform: uppercase;
  margin-bottom: 10px;
}
.section-desc { color: var(--text-muted); max-width: 540px; margin: 0; }

/* ---- Product grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px -18px rgba(15,30,60,.18);
  border-color: var(--primary);
}
.product-card-head { display: flex; flex-direction: column; gap: 4px; }
.product-card h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0;
  text-transform: uppercase;
}
.product-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  min-height: 36px;
}
.product-card-image {
  flex: 1;
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  background: #f7f8fb;
  border-radius: 4px;
  overflow: hidden;
}
.product-card-image img {
  width: 100%; height: 100%; object-fit: contain;
}
.product-card-arrow {
  position: absolute;
  right: 18px; bottom: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-light);
  display: grid; place-items: center;
  transition: background .15s, color .15s;
  color: var(--text);
}
.product-card:hover .product-card-arrow {
  background: var(--primary); color: #fff;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark-muted);
  padding: 56px 0 24px;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.footer-grid ul li { padding: 4px 0; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { margin: 0 0 6px; line-height: 1.6; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  color: var(--text-on-dark-muted);
}
.footer-bottom a:hover { color: #fff; }

/* ---- Sub-page hero ---- */
.subhero {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 70px 0 50px;
}
.subhero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800; letter-spacing: -0.3px;
  margin: 0 0 12px;
}
.subhero .breadcrumb {
  font-size: 12px; letter-spacing: 1px;
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.subhero .breadcrumb a:hover { color: #fff; }
.subhero p { color: var(--text-on-dark-muted); max-width: 720px; margin: 0; }

/* ---- Product detail layout ---- */
.product-detail {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  padding: 60px 0;
}
.product-detail-image {
  background: #f7f8fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: grid; place-items: center;
}
.product-detail-image img { width: 100%; height: auto; }
.product-detail h2 {
  font-size: 28px; font-weight: 800;
  margin: 0 0 16px; letter-spacing: -0.2px;
}
.product-detail .badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-light);
  color: var(--primary);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.product-detail .lede {
  font-size: 16px; line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 24px;
}
.feature-list { display: grid; gap: 10px; margin-bottom: 28px; }
.feature-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text);
}
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 12px; height: 2px; background: var(--primary);
}

.spec-table-caption {
  margin: 30px 0 0;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.spec-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.spec-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
}
.spec-table th, .spec-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}
.spec-table thead th {
  background: var(--bg-light);
  font-weight: 700;
}
.spec-table tbody tr:nth-child(even) { background: #fafbfd; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 50px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #f7f8fb;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ---- Slider ---- */
.slider {
  position: relative;
  margin-top: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f7f8fb;
  border: 1px solid var(--line);
}
.slider-track {
  display: flex;
  transition: transform .35s ease;
  will-change: transform;
}
.slider-slide {
  flex: 0 0 100%;
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.slider-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #f7f8fb;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(12, 20, 36, 0.65);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  z-index: 2;
}
.slider-btn:hover { background: rgba(12, 20, 36, 0.9); }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }
.slider-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(12, 20, 36, 0.55);
  border-radius: 999px;
  z-index: 2;
}
.slider-dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: background .15s, width .15s;
}
.slider-dots button.is-active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  width: 44px; height: 44px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

/* ---- About / contact ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-grid img { width: 100%; border-radius: var(--radius); }
.about-grid h2 { font-size: 28px; font-weight: 800; margin: 0 0 12px; }
.timeline { display: grid; gap: 14px; }
.timeline li {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 0; }
.timeline .year { font-weight: 800; color: var(--primary); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-card h3 { margin: 0 0 8px; font-size: 16px; }
.contact-list dt {
  font-size: 11px; letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 12px;
}
.contact-list dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; }

/* ---- CTA banner ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}
.cta-banner h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.cta-banner p { margin: 0; color: var(--text-on-dark-muted); font-size: 14px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .nav-list { display: none; }
  .nav-toggle { display: flex; }
  .site-header { position: relative; }
  .site-header.is-open .nav-list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-dark);
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    gap: 0;
    z-index: 50;
  }
  .site-header.is-open .nav-list a {
    display: block;
    padding: 14px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    border-radius: 0;
  }

  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .slider-btn { width: 40px; height: 40px; font-size: 22px; }
}

@media (max-width: 720px) {
  .hero .container {
    grid-template-columns: 1fr;
    padding-top: 36px;
    padding-bottom: 36px;
    min-height: auto;
  }
  .hero-image { order: -1; margin-bottom: 8px; }

  .section { padding: 56px 0; }
  .section-head { flex-direction: column; align-items: start; }

  .product-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .product-card { padding: 16px; }
  .product-card h3 { font-size: 14px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; }

  .cta-banner { flex-direction: column; align-items: start; padding: 24px; }

  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }

  .timeline li { grid-template-columns: 70px 1fr; }
}

@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr; }
}
