/* ============================================================
   Hanyuan Textile — Global Styles
   Professional industrial B2B theme
   ============================================================ */

:root {
  /* Color system: navy primary + copper accent + neutrals */
  --bg: #ffffff;
  --bg-alt: #f3f5f8;
  --bg-dark: #0e1d2f;
  --ink: #11233a;
  --ink-soft: #5a6b7d;
  --line: #e2e7ee;
  --primary: #14365a;
  --primary-700: #0f2842;
  --accent: #c46a2b;
  --accent-soft: #f4e8dd;
  --on-dark: #e8eef5;
  --on-dark-soft: #9fb0c3;

  --radius: 6px;
  --maxw: 1200px;
  --header-h: 76px;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;

  --shadow-sm: 0 1px 2px rgba(17, 35, 58, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 35, 58, 0.08);
  --shadow-lg: 0 18px 48px rgba(17, 35, 58, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.center { text-align: center; }

.hx-language-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}

.hx-language-toggle {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.hx-language-toggle:hover,
.hx-language-menu.open .hx-language-toggle {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-alt);
}

.hx-language-caret {
  font-size: 0.7rem;
}

.hx-language-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  display: none;
  flex-direction: column;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.hx-language-menu.open .hx-language-panel {
  display: flex;
}

.hx-language-panel a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  white-space: nowrap;
}

.hx-language-panel a.is-active {
  color: var(--primary);
  font-weight: 700;
  background: var(--bg-alt);
}

.inquiry-form {
  display: grid;
  gap: 14px;
}

.inquiry-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
}

.inquiry-form input,
.inquiry-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
  outline: 2px solid rgba(196, 106, 43, 0.25);
  border-color: var(--accent);
}

.form-note.show {
  display: block;
  color: #0f7a3c;
  font-weight: 600;
}

.acc-item {
  border-bottom: 1px solid var(--line);
}

.acc-head {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.acc-body p {
  color: var(--ink-soft);
  padding: 0 0 22px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1rem; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

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

.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: var(--on-dark); }
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

.lead { font-size: 1.15rem; color: var(--ink-soft); }

.text-muted { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #a9551c; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--dark { background: var(--primary); color: #fff; }
.btn--dark:hover { background: var(--primary-700); transform: translateY(-1px); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--light { background: #fff; color: var(--primary); }
.btn--light:hover { background: var(--bg-alt); }
.btn--outline-light { background: transparent; border-color: rgba(255,255,255,0.4); color: #fff; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn--lg { padding: 16px 32px; font-size: 1rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-head);
}
.link-arrow svg { transition: transform 0.2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--primary);
  display: grid; place-items: center;
  color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem;
}
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--primary); letter-spacing: -0.02em; }
.brand-sub { display: block; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: var(--primary); background: var(--bg-alt); }
.main-nav a.active { color: var(--primary); font-weight: 600; }

.header-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: 0.25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 940px) {
  .header-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 24px;
    gap: 2px;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 12px 10px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .main-nav .btn { display: inline-flex; margin-top: 12px; }
  .hx-language-menu { margin: 12px 0 0; align-self: flex-start; }
  .hx-language-panel { left: 0; right: auto; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  color: var(--on-dark);
  background: var(--bg-dark);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.32;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(14,29,47,0.95) 0%, rgba(14,29,47,0.6) 60%, rgba(14,29,47,0.4) 100%);
}
.hero__inner { position: relative; z-index: 1; padding: 110px 0 100px; max-width: 760px; }
.hero h1 { color: #fff; margin-bottom: 22px; }
.hero p { color: var(--on-dark-soft); font-size: 1.18rem; max-width: 580px; margin-bottom: 32px; }
.hero .btn-row { margin-bottom: 48px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; }
.hero-stat .num { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: #fff; }
.hero-stat .lbl { font-size: 0.85rem; color: var(--on-dark-soft); }

/* Page banner (interior pages) */
.page-banner {
  background: var(--primary);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-banner::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(196,106,43,0.18);
}
.page-banner__inner { position: relative; z-index: 1; padding: 70px 0 64px; }
.page-banner h1 { color: #fff; margin-bottom: 10px; }
.page-banner p { color: var(--on-dark-soft); max-width: 600px; margin: 0; }
.breadcrumb { font-size: 0.85rem; color: var(--on-dark-soft); margin-bottom: 18px; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { margin: 0 8px; opacity: 0.5; }

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

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d4dce6; }
.feature-icon {
  width: 50px; height: 50px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 18px;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--ink-soft); margin: 0; font-size: 0.96rem; }

/* Product card */
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-card__img img { transform: scale(1.06); }
.product-card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.tag {
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--primary); background: #eaf0f6;
  padding: 4px 10px; border-radius: 100px; margin-bottom: 12px;
}
.product-card__body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.product-card__body p { color: var(--ink-soft); font-size: 0.9rem; flex: 1; }
.spec-mini { display: flex; gap: 16px; font-size: 0.8rem; color: var(--ink-soft); margin: 12px 0 16px; flex-wrap: wrap; }
.spec-mini b { color: var(--ink); font-weight: 600; }

/* ============================================================
   Split / media blocks
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split--reverse .split__media { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split--reverse .split__media { order: 0; }
}
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }
.split__body h2 { margin-bottom: 16px; }
.split__body p { color: var(--ink-soft); }

.check-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 9px 0; color: var(--ink);
}
.check-list li svg { flex-shrink: 0; color: var(--accent); margin-top: 3px; }

/* Stats band */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
@media (max-width: 700px) { .stat-band { grid-template-columns: repeat(2, 1fr); } }
.stat-band .num { font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; color: var(--accent); }
.stat-band .lbl { color: var(--on-dark-soft); font-size: 0.92rem; }

/* Logos / certs */
.cert-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.cert-pill {
  border: 1px solid var(--line); border-radius: 100px;
  padding: 10px 20px; font-weight: 600; font-size: 0.9rem; color: var(--ink-soft);
  background: #fff;
}

/* ============================================================
   Product detail
   ============================================================ */
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .pd-grid { grid-template-columns: 1fr; } }
.pd-gallery .main-img { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.pd-gallery .main-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.pd-thumbs { display: flex; gap: 12px; margin-top: 12px; }
.pd-thumbs button {
  width: 80px; height: 64px; border-radius: 6px; overflow: hidden;
  border: 2px solid var(--line); background: none; cursor: pointer; padding: 0;
}
.pd-thumbs button.active { border-color: var(--accent); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.spec-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.spec-table th { width: 42%; color: var(--ink-soft); font-weight: 500; background: var(--bg-alt); }
.spec-table td { font-weight: 600; }

/* Tabs */
.tabs { border-bottom: 1px solid var(--line); display: flex; gap: 4px; margin-bottom: 28px; flex-wrap: wrap; }
.tab-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 0.98rem;
  padding: 14px 20px; color: var(--ink-soft); border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   News / blog
   ============================================================ */
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card__img { aspect-ratio: 16/10; overflow: hidden; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 22px; }
.post-meta { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 10px; display: flex; gap: 10px; }
.post-meta .cat { color: var(--accent); font-weight: 700; }
.post-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.post-card p { color: var(--ink-soft); font-size: 0.92rem; }

/* ============================================================
   FAQ accordion
   ============================================================ */
.accordion { max-width: 820px; margin: 0 auto; }
.acc-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: #fff; overflow: hidden; }
.acc-head {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 24px; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.acc-head .ico { flex-shrink: 0; transition: transform 0.25s; color: var(--accent); }
.acc-item.open .acc-head .ico { transform: rotate(45deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.acc-body-inner { padding: 0 24px 22px; color: var(--ink-soft); }

/* ============================================================
   Forms / contact
   ============================================================ */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 0.95rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,54,90,0.1);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 8px; }
.form-success {
  display: none; background: #e8f5ee; border: 1px solid #b6dcc5; color: #1d6b42;
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 500;
}
.form-success.show { display: block; }

.contact-info-card { background: var(--bg-dark); color: var(--on-dark); border-radius: var(--radius); padding: 36px; }
.contact-info-card h3 { color: #fff; }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.contact-line:last-child { border-bottom: none; }
.contact-line svg { flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.contact-line .lbl { font-size: 0.78rem; color: var(--on-dark-soft); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-line .val { color: #fff; font-weight: 500; }

/* ============================================================
   CTA strip
   ============================================================ */
.cta-strip { background: var(--primary); color: #fff; border-radius: 10px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-strip h2 { color: #fff; margin-bottom: 6px; }
.cta-strip p { color: var(--on-dark-soft); margin: 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--bg-dark); color: var(--on-dark-soft); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand-name { color: #fff; }
.footer-about { font-size: 0.92rem; margin: 16px 0; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col a { display: block; padding: 6px 0; font-size: 0.92rem; color: var(--on-dark-soft); transition: color 0.15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 0.85rem; flex-wrap: wrap; gap: 12px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* utility */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
