/* JIUYUAN flange site - heavy industrial dark theme */

:root {
  --bg: #0e1116;
  --bg-2: #141920;
  --panel: #191f28;
  --panel-2: #1e252f;
  --line: #2b3440;
  --line-soft: #232b36;
  --text: #e8edf2;
  --muted: #97a3b0;
  --accent: #ff7a1a;
  --accent-2: #ffb066;
  --blue: #4da3ff;
  --steel: #6b7684;
  --font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

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

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(14, 17, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.brand-mark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--text);
}
.brand-mark span { color: var(--accent); }
.brand-sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.langs { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 3px; padding: 2px; }
.langs button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 9px;
  cursor: pointer;
  border-radius: 2px;
}
.langs button.on { background: var(--accent); color: #14100a; font-weight: 600; }

.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 3px; color: var(--text); padding: 6px 10px; cursor: pointer; font-size: 16px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: url('../img/hero/cover.jpg') center 30% / cover no-repeat #0b0d11;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(10, 12, 16, 0.92) 0%, rgba(10, 12, 16, 0.72) 45%, rgba(10, 12, 16, 0.25) 100%);
}
/* blueprint grid overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(77, 163, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 163, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; padding-top: 64px; }
.hero-kicker {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid rgba(255, 122, 26, 0.4);
  padding: 7px 14px;
  margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(52px, 9vw, 108px);
  line-height: 0.95;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}
.hero h1 .l2 { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.hero p {
  max-width: 560px;
  margin: 26px 0 36px;
  color: #c3ccd6;
  font-size: 17px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 30px;
  border: 1px solid var(--accent);
  transition: all 0.15s;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #14100a; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--text); }

/* ---------- stats strip ---------- */
.stats { border-bottom: 1px solid var(--line-soft); background: var(--bg-2); }
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 26px 20px;
  border-left: 1px solid var(--line-soft);
}
.stat:first-child { border-left: 0; }
.stat .v {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.stat .k { font-size: 12.5px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.sec-head { margin-bottom: 44px; }
.kicker {
  font-size: 12.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::before { content: ''; width: 34px; height: 1px; background: var(--accent); }
h2.sec-title {
  font-family: var(--font-head);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 10px;
  line-height: 1.1;
}
.sec-sub { color: var(--muted); margin-top: 10px; max-width: 640px; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 54px;
  align-items: center;
}
.about-copy p { color: #b9c3ce; margin-bottom: 16px; }
.about-points { list-style: none; margin-top: 22px; }
.about-points li {
  padding: 10px 0 10px 30px;
  position: relative;
  border-bottom: 1px dashed var(--line-soft);
  color: var(--text);
  font-weight: 500;
}
.about-points li::before {
  content: '';
  position: absolute;
  left: 0; top: 16px;
  width: 14px; height: 8px;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: saturate(0.9);
}
.about-photos .tall { grid-row: span 2; }

/* ---------- photo grids (certs / equip / testing) ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.photo-grid.four { grid-template-columns: repeat(4, 1fr); }
.ph {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  cursor: zoom-in;
}
.ph img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s, opacity 0.3s;
  filter: saturate(0.92);
}
.ph:hover img { transform: scale(1.04); }
.ph figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dfe6ee;
  background: linear-gradient(transparent, rgba(10, 12, 16, 0.85));
}

/* ---------- products ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.prod-card {
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.prod-card .img {
  border-bottom: 1px solid var(--line);
  background: #10141a;
}
.prod-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: saturate(0.9); }
.prod-body { padding: 18px 20px 22px; flex: 1; }
.prod-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid rgba(255, 122, 26, 0.45);
  padding: 2px 10px;
  margin-bottom: 8px;
}
.prod-body h3 { font-family: var(--font-head); font-size: 21px; font-weight: 600; letter-spacing: 0.03em; }
.prod-body p { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- equipment ---------- */
.equip-block { margin-bottom: 52px; }
.equip-block:last-child { margin-bottom: 0; }
.equip-block h3 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 14px;
}
.equip-block h3 .n { color: var(--accent); font-size: 15px; letter-spacing: 0.1em; }
.equip-block > p { color: var(--muted); margin: 6px 0 20px; max-width: 640px; }

/* ---------- data section ---------- */
.data-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}
.seg {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.seg button {
  background: var(--panel);
  color: var(--muted);
  border: 0;
  padding: 9px 16px;
  font-size: 13.5px;
  cursor: pointer;
  border-left: 1px solid var(--line);
}
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--accent); color: #14100a; font-weight: 600; }
.select {
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2397a3b0'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  font-size: 13.5px;
  padding: 9px 36px 9px 12px;
  appearance: none;
  cursor: pointer;
}
.data-search {
  flex: 1;
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  padding: 9px 14px;
  font-size: 13.5px;
}
.data-search::placeholder { color: var(--steel); }

.data-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 26px;
  align-items: start;
}
.data-drawing {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px;
  position: sticky;
  top: 84px;
}
.data-drawing img { width: 100%; }
.data-drawing .cap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.data-drawing .cap b { color: var(--text); font-size: 14px; display: block; letter-spacing: 0.03em; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--panel); }
table.dims { width: 100%; border-collapse: collapse; font-size: 13.5px; white-space: nowrap; }
table.dims thead th {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--panel-2);
  text-align: right;
  padding: 11px 14px;
  border-bottom: 2px solid var(--line);
  position: sticky;
  top: 0;
}
table.dims thead th:first-child, table.dims tbody td:first-child { text-align: left; }
table.dims tbody td {
  padding: 8.5px 14px;
  text-align: right;
  border-bottom: 1px solid var(--line-soft);
  color: #cdd6df;
  font-variant-numeric: tabular-nums;
}
table.dims tbody td:first-child { color: var(--text); font-weight: 600; }
table.dims tbody tr:hover td { background: rgba(255, 122, 26, 0.06); }
table.dims tbody tr:last-child td { border-bottom: 0; }

.data-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
}
.link-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 3px;
  padding: 8px 16px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-transform: uppercase;
}
.link-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-list { list-style: none; margin-top: 8px; }
.contact-list li {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}
.contact-list .k {
  min-width: 150px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 3px;
}
.contact-list .v { font-size: 15.5px; }
.contact-list .v .todo { color: var(--steel); font-style: italic; }
.contact-map {
  border: 1px solid var(--line);
  min-height: 300px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 60% 40%, rgba(77, 163, 255, 0.08), transparent 50%),
    linear-gradient(rgba(77, 163, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 163, 255, 0.04) 1px, transparent 1px),
    var(--panel);
  background-size: auto, 36px 36px, 36px 36px, auto;
  text-align: center;
}
.contact-map .pin {
  font-family: var(--font-head);
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}
.contact-map .coords { color: var(--muted); font-size: 12.5px; letter-spacing: 0.14em; margin-top: 6px; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line-soft);
  padding: 30px 0;
  background: #0b0e12;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--steel);
  font-size: 13px;
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: rgba(8, 10, 13, 0.92);
  cursor: zoom-out;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 88vh; border: 1px solid var(--line); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .data-layout { grid-template-columns: 1fr; }
  .data-drawing { position: static; max-width: 380px; }
  .photo-grid.four { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 780px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 10px 24px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .burger { display: block; }
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat { border-top: 1px solid var(--line-soft); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .prod-grid, .photo-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 60px 0; }
}
@media (max-width: 540px) {
  .prod-grid, .photo-grid, .photo-grid.four { grid-template-columns: 1fr; }
  .about-photos { grid-template-columns: 1fr 1fr; }
  .about-photos .tall { grid-row: auto; }
}
