/* ==========================================================================
   Jadeway Industrial Cutting Tools — Global Stylesheet
   Light/Dark theming via CSS variables + [data-theme] on <html>.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
  /* Brand — electric blue accent (international / high-tech) */
  --brand: #1a68c9;
  --brand-dark: #114b96;
  --brand-soft: #e9f1fb;

  /* Light theme — cool neutral */
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --bg-card: #ffffff;
  --text: #101826;
  --text-muted: #5a6779;
  --border: #e3e9f1;
  --header-bg: rgba(255, 255, 255, 0.9);
  --shadow: 0 1px 2px rgba(16, 24, 38, 0.06), 0 12px 32px rgba(16, 24, 38, 0.09);
  --steel: #0b1a2e;          /* deep navy for footer/frames */

  --maxw: 1200px;
  --radius: 8px;
  --radius-sm: 4px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-head: "IBM Plex Sans", "Inter", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[data-theme="dark"] {
  --bg: #0a1120;
  --bg-alt: #0e1626;
  --bg-card: #111c30;
  --text: #eef3fa;
  --text-muted: #93a4bb;
  --border: #1e2c42;
  --header-bg: rgba(10, 17, 32, 0.85);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 18px 40px rgba(0, 0, 0, 0.5);
  --steel: #060c17;
  --brand: #3f9bff;
  --brand-dark: #2f80ed;
  --brand-soft: rgba(63, 155, 255, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

/* Anti-copy hint: discourage casual copying (NOT real protection) */
img { -webkit-user-drag: none; user-select: none; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.14; color: var(--text); margin-top: 0; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.15rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.008em; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

p { color: var(--text-muted); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

section { padding: 92px 0; }
.section-alt { background: var(--bg-alt); }

.eyebrow {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.lead { font-size: 1.15rem; max-width: 720px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.22rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  border-radius: 8px; font-weight: 800; font-size: 1.1rem;
}
.brand small { display: block; font-size: 0.62rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.1em; }

.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a.navlink {
  color: var(--text); font-weight: 500; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 6px;
}
.nav-links a.navlink:hover { background: var(--bg-alt); text-decoration: none; color: var(--brand); }

.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); cursor: pointer; font-size: 0.85rem; font-weight: 700;
  display: grid; place-items: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Highlight "Request a Quote" as a CTA button in the nav (big-brand pattern) */
.nav-links a.navlink[href="contact.html"] {
  background: var(--brand); color: #fff; font-weight: 600; margin-left: 6px;
}
.nav-links a.navlink[href="contact.html"]:hover { background: var(--brand-dark); color: #fff; }

.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #eef3fa;
  padding: 120px 0 110px;
  border-bottom: 1px solid var(--border);
  min-height: 560px;
  display: flex;
  align-items: center;
  background: linear-gradient(155deg, #0d1a2e 0%, #0a1120 62%);
}
/* blueprint / technical-drawing grid (major + fine), fading out at the edges */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(120,170,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,170,255,0.06) 1px, transparent 1px),
    linear-gradient(rgba(120,170,255,0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,170,255,0.032) 1px, transparent 1px);
  background-size: 52px 52px, 52px 52px, 8px 8px, 8px 8px;
  -webkit-mask-image: radial-gradient(130% 100% at 68% 45%, #000 45%, transparent 88%);
          mask-image: radial-gradient(130% 100% at 68% 45%, #000 45%, transparent 88%);
}
/* soft blue glow pooled behind the blade */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(46% 70% at 74% 46%, rgba(63,155,255,0.16), transparent 60%);
}
/* right-side blade stage: floating cutout + metallic light-sweep */
.hero-stage { position: relative; z-index: 1; display: grid; place-items: center; }
.hero-blade-wrap { position: relative; width: 100%; max-width: 540px; aspect-ratio: 760 / 681; margin: 0 auto; }
.hero-blade-wrap::before {
  content: ""; position: absolute; inset: 6%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(63,155,255,0.42), transparent 62%);
  filter: blur(26px);
}
.hero-blade {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; object-fit: contain;
  filter: drop-shadow(0 22px 44px rgba(0,0,0,0.55)) drop-shadow(0 0 26px rgba(63,155,255,0.22));
  animation: heroFloat 7s ease-in-out infinite;
}
.hero-sweep {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  -webkit-mask: url('../img/hero-blade.png') center / contain no-repeat;
          mask: url('../img/hero-blade.png') center / contain no-repeat;
  background: linear-gradient(115deg, transparent 43%, rgba(195,228,255,0.65) 50%, transparent 57%);
  background-size: 250% 100%;
  mix-blend-mode: screen;
  animation: heroSweep 4.2s ease-in-out infinite;
}
@keyframes heroFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes heroSweep { 0% { background-position: 135% 0; } 60%,100% { background-position: -35% 0; } }
@media (prefers-reduced-motion: reduce) { .hero-blade, .hero-sweep { animation: none; } }
@media (max-width: 900px) { .hero-blade-wrap { max-width: 360px; } }
.hero .container { width: 100%; position: relative; z-index: 1; }
.hero-copy { position: relative; z-index: 1; max-width: 660px; }
.hero h1 { color: #ffffff; max-width: 900px; }
.hero p, .hero .lead { color: #c6d4e6; }
.hero .btn-outline { color: #eef3fa; border-color: rgba(255,255,255,0.35); }
.hero .btn-outline:hover { color: #fff; border-color: var(--brand); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(63,155,255,0.14); color: #8fc0ff;
  border: 1px solid rgba(63,155,255,0.3);
  padding: 7px 16px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.02em; margin-bottom: 26px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero-stats {
  display: flex; gap: 56px; margin-top: 64px; flex-wrap: wrap;
  padding-top: 40px; border-top: 1px solid rgba(255,255,255,0.14);
}
.hero-stats .stat strong { display: block; font-family: var(--font-head); font-size: 1.95rem; color: #fff; font-weight: 700; letter-spacing: -0.03em; }
.hero-stats .stat span { color: #93a4bb; font-size: 0.86rem; }

/* Split hero: copy left, framed visual right */
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 60px; align-items: center; }
.hero-visual {
  position: relative; aspect-ratio: 5 / 4; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  background: linear-gradient(140deg, #1c1d21 0%, #303237 100%);
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.hero-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.hero-visual .hv-label {
  position: relative; z-index: 1; color: #8d8f95; font-size: 0.86rem;
  text-align: center; padding: 24px; line-height: 1.5;
}
.hero-visual .hv-label small { display: block; opacity: 0.7; margin-top: 6px; font-size: 0.78rem; }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
}

/* ---------- Dark industrial-tech treatment (default look) ---------- */
/* hero background is handled by base .hero (metal-wire), same in both themes */
html[data-theme="dark"] .card {
  background: linear-gradient(180deg, #14233a 0%, #101c30 100%);
}
html[data-theme="dark"] .card:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(63, 155, 255, 0.22), 0 20px 44px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] .cat-card:hover .cat-icon { filter: drop-shadow(0 0 10px rgba(63, 155, 255, 0.55)); }
html[data-theme="dark"] .btn-primary { box-shadow: 0 6px 20px rgba(63, 155, 255, 0.28); }
html[data-theme="dark"] .btn-primary:hover { box-shadow: 0 10px 28px rgba(63, 155, 255, 0.44); }
html[data-theme="dark"] .hero-visual {
  border-color: #23324a;
  box-shadow: 0 0 0 1px rgba(63, 155, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.6);
}
html[data-theme="dark"] .spec-table th { background: #0e1626; }
html[data-theme="dark"] .page-hero {
  background:
    radial-gradient(60% 120% at 85% 0%, rgba(63, 155, 255, 0.12), transparent 60%),
    var(--bg-alt);
}
/* hero stays dark navy (metal-wire) in both themes; text colors set on base .hero */

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.95rem; }

.cat-card { display: flex; flex-direction: column; height: 100%; }
.cat-card .cat-icon {
  width: 40px; height: 40px; margin-bottom: 22px;
  display: grid; place-items: center; color: var(--brand);
}
.cat-card .cat-icon svg { width: 30px; height: 30px; }
.cat-card .cat-photo {
  display: block; width: calc(100% + 56px); margin: -28px -28px 20px;
  height: 180px; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.cat-card .cat-link {
  margin-top: auto; padding-top: 14px; font-weight: 600; font-size: 0.9rem;
}

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Feature list ---------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 40px; }
.feature { display: flex; gap: 14px; }
.feature .fi {
  flex: 0 0 40px; height: 40px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800;
}
.feature h4 { margin: 2px 0 4px; }
.feature p { margin: 0; font-size: 0.92rem; }

/* ---------- Spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.94rem; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.spec-table th { background: var(--bg-alt); font-weight: 700; color: var(--text); }
.spec-table td { color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--steel);
  color: #fff; text-align: center; border-radius: var(--radius);
  padding: 64px 30px;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #b8babf; max-width: 620px; margin: 0 auto 28px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.field label .req { color: var(--brand); }
.field input, .field select, .field textarea {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.98rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.form-success {
  display: none; background: var(--brand-soft); border: 1px solid var(--brand);
  color: var(--brand-dark); padding: 16px 18px; border-radius: 8px; margin-bottom: 18px;
  font-weight: 600;
}

/* ---------- Product media (photo / placeholder) ---------- */
.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--bg-alt) 0%, var(--border) 100%);
  border: 1px solid var(--border);
  display: grid; place-items: center;
}
.product-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; z-index: 2;
}
.product-media .ph-label {
  position: relative; z-index: 1;
  color: var(--text-muted); font-size: 0.92rem; font-weight: 600;
  text-align: center; padding: 16px;
}
.product-media .ph-label small { display: block; font-weight: 400; opacity: 0.75; margin-top: 4px; }

.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .product-layout { grid-template-columns: 1fr; } }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.chip {
  background: var(--brand-soft); color: var(--brand-dark);
  border: 1px solid var(--brand); border-radius: 999px;
  padding: 4px 12px; font-size: 0.82rem; font-weight: 600;
}
html[data-theme="dark"] .chip { color: #f4b980; }

.app-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.app-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-muted); }
.app-list li::before { content: "▸"; color: var(--brand); font-weight: 700; }

.related-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.related-row a {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px;
  font-size: 0.9rem; color: var(--text); font-weight: 500;
}
.related-row a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* ---------- Product gallery / showroom ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s ease, transform 0.15s ease;
}
.gallery-item:hover { border-color: var(--brand); transform: translateY(-3px); }
.gi-img { position: relative; aspect-ratio: 4 / 3; background: #0b1220; }
.gi-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gi-img::after { content: ""; position: absolute; inset: 0; } /* overlay: deters right-click-save on the image */
.gi-cap { padding: 13px 15px; }
.gi-cap h4 { margin: 0 0 3px; font-size: 0.95rem; }
.gi-cap span { color: var(--text-muted); font-size: 0.82rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--bg-alt); padding: 52px 0; border-bottom: 1px solid var(--border); }
.page-hero h1 { margin-bottom: 10px; }
.page-hero p { max-width: 720px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--steel); color: #c4cdd6; padding: 60px 0 28px; }
html[data-theme="dark"] .site-footer { background: #0a0f15; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer a { color: #c4cdd6; display: block; padding: 5px 0; font-size: 0.92rem; }
.site-footer a:hover { color: var(--brand); text-decoration: none; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.footer-about p { color: #9aa9b7; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.85rem; color: #8b98a5;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.hide { display: none !important; }
[data-i18n-zh] { } /* language spans handled by JS */

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 10px 20px 20px; display: none; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a.navlink { padding: 12px 8px; border-radius: 0; border-bottom: 1px solid var(--border); }
  .menu-toggle { display: grid; }
}
@media (max-width: 620px) {
  .grid-3, .grid-4, .grid-2, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .hero { padding: 70px 0; }
  .hero-stats { gap: 26px; }
}
