:root {
  --bg: #f5f4f0;
  --bg-dark: #0f1419;
  --ink: #0f1419;
  --ink-mid: #4a5160;
  --ink-soft: #8a8f9a;
  --line: #d8d5cd;
  --line-soft: #e8e5dd;
  --accent: #1e3a5f;
  --accent-bright: #2c5485;
  --paper: #fafaf6;

  --font-sans: 'Pretendard', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-w: 1320px;
  --gutter: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

.coord {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

/* ============ Topbar ============ */
.topbar {
  background: var(--bg-dark);
  color: var(--bg);
  font-size: 12px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #1f2530;
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 8px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.topbar .coord { color: rgba(245,244,240,0.5); }
.topbar a { color: rgba(245,244,240,0.85); transition: color .15s; }
.topbar a:hover { color: white; }
.topbar-links { display: flex; gap: 20px; align-items: center; }
.topbar-divider { width: 1px; height: 12px; background: rgba(245,244,240,0.2); }

/* ============ Header ============ */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-mark::before {
  content: '◼';
  color: var(--accent);
  margin-right: 8px;
  font-size: 14px;
  vertical-align: 2px;
}
.brand-tag {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.nav { display: flex; gap: 36px; align-items: center; }
.nav > a, .nav-item > a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mid);
  position: relative;
  padding: 8px 0;
  transition: color .15s;
}
.nav > a:hover, .nav-item > a:hover { color: var(--ink); }
.nav > a.active, .nav-item > a.active { color: var(--ink); }
.nav > a.active::after, .nav-item > a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}
.nav a.has-sub::after {
  content: '+';
  font-family: var(--font-mono);
  margin-left: 6px;
  color: var(--ink-soft);
  font-weight: 400;
}
.nav-item { position: relative; }
.nav-sub {
  position: absolute;
  top: 100%;
  left: -16px;
  background: var(--bg-dark);
  padding: 8px 0;
  min-width: 200px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s;
}
.nav-item:hover .nav-sub {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-sub a {
  display: block;
  padding: 10px 20px;
  color: rgba(245,244,240,0.8);
  font-size: 13px;
}
.nav-sub a:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-sub a.active { color: white; background: rgba(255,255,255,0.05); }

.menu-toggle { display: none; }

/* ============ Section labels ============ */
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* ============ CTA ============ */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-dark);
  color: var(--bg);
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background .15s;
  border: 1px solid var(--bg-dark);
}
.cta:hover { background: var(--accent); border-color: var(--accent); }
.cta-arrow { font-family: var(--font-mono); transition: transform .2s; }
.cta:hover .cta-arrow { transform: translateX(4px); }

/* ============ Page header (subpages) ============ */
.page-head {
  padding: 60px 0 48px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.4;
  pointer-events: none;
}
.page-head-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}
.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--ink-soft); transition: color .15s; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb-sep { opacity: 0.5; }
.page-title-en {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-title {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

/* ============ Product layout ============ */
.product-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px var(--gutter) 100px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
}
.product-sidebar {
  position: sticky;
  top: 100px;
  border-top: 1px solid var(--line);
}
.sidebar-section {
  border-bottom: 1px solid var(--line);
  padding: 20px 0 18px;
}
.sidebar-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.sidebar-list { display: flex; flex-direction: column; gap: 8px; }
.sidebar-list a {
  font-size: 14px;
  color: var(--ink-mid);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  transition: color .15s;
}
.sidebar-list a:hover { color: var(--ink); }
.sidebar-list a.active {
  color: var(--accent);
  font-weight: 600;
}
.sidebar-list a.active::after {
  content: '●';
  color: var(--accent);
  font-size: 8px;
}
.sidebar-list a .mono-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
}

.product-main {}
.product-overview {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-mid);
  margin-bottom: 48px;
  max-width: 760px;
}
.product-overview strong { color: var(--ink); font-weight: 600; }

.section-block {
  margin-bottom: 64px;
}
.section-block-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.section-block-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.section-block-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ============ Drawings ============ */
.drawings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.drawing {
  background: var(--paper);
  padding: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.drawing img { max-width: 100%; max-height: 360px; width: auto; height: auto; }
.drawing-label {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 2px 6px;
}
.drawing-caption {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-soft);
}

/* ============ Spec tables ============ */
.spec-tables { display: flex; flex-direction: column; gap: 24px; }
.spec-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--font-mono);
  min-width: 600px;
}
.spec-table th, .spec-table td {
  padding: 10px 14px;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.spec-table th:last-child, .spec-table td:last-child { border-right: none; }
.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table thead th {
  background: var(--bg-dark);
  color: var(--bg);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-right-color: rgba(255,255,255,0.1);
}
.spec-table thead th:first-child {
  background: var(--accent);
}
.spec-table tbody td:first-child {
  font-weight: 600;
  background: var(--bg);
  color: var(--ink);
}
.spec-table tbody tr:hover td { background: var(--bg); }
.spec-table tbody tr:hover td:first-child { background: var(--line-soft); }

.spec-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ============ Footer ============ */
.footer {
  background: var(--bg);
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.footer-meta {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.8;
}
.footer-meta strong {
  color: var(--ink);
  font-weight: 600;
  margin-right: 6px;
}
.footer-nav { display: flex; gap: 32px; font-size: 13px; }
.footer-nav a { color: var(--ink-mid); transition: color .15s; }
.footer-nav a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .product-sidebar {
    position: static;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
  }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .topbar-inner { font-size: 11px; gap: 12px; }
  .topbar-links { display: none; }

  .nav { display: none; position: fixed; top: 65px; left: 0; right: 0; background: var(--bg-dark); flex-direction: column; gap: 0; padding: 20px; }
  .nav.open { display: flex; }
  .nav > a, .nav-item { color: var(--bg); padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); width: 100%; }
  .nav > a, .nav-item > a { color: var(--bg); }
  .nav a.has-sub::after { display: none; }
  .nav-sub { position: static; opacity: 1; pointer-events: auto; transform: none; background: transparent; padding: 0 0 0 16px; }
  .nav-sub a { padding: 8px 0; border-bottom: none; font-size: 13px; }

  .menu-toggle {
    display: block;
    background: none;
    border: 1px solid var(--line);
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    color: var(--ink);
  }

  .footer-top { flex-direction: column; gap: 24px; }
  .footer-nav { flex-wrap: wrap; gap: 16px 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }

  .page-head { padding: 40px 0 32px; }
  .product-layout { padding: 40px var(--gutter) 60px; }
  .section-block { margin-bottom: 48px; }
}
