/* ========================================================================
   KaiTron Mata Flow — Ultrafiltration Membrane Company Website
   Reference style inspired by a-jmtech.com (blue/white industrial B2B)
   ======================================================================== */

:root {
  --c-primary: #0b3d91;
  --c-primary-dark: #082b66;
  --c-primary-light: #1b7fd4;
  --c-accent: #00bcd4;
  --c-bg: #ffffff;
  --c-bg-alt: #f5f9ff;
  --c-bg-dark: #061f4a;
  --c-text: #1a2b4a;
  --c-text-soft: #5a6a82;
  --c-text-mute: #8696ad;
  --c-border: #e3ecf8;
  --c-white: #ffffff;

  --shadow-sm: 0 2px 8px rgba(11, 61, 145, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 61, 145, 0.08);
  --shadow-lg: 0 16px 48px rgba(11, 61, 145, 0.12);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --container: 1240px;
  --header-h: 76px;
  --topbar-h: 36px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: calc(var(--header-h) + var(--topbar-h));
}
img, svg { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--c-primary-light); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.3; color: var(--c-text); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* remove the grey tap flash on touch devices for a native feel */
a, button, .btn, input, select, textarea, .lang-btn, .nav-toggle { -webkit-tap-highlight-color: transparent; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--c-primary);
  color: var(--c-white);
  box-shadow: 0 6px 18px rgba(11, 61, 145, 0.25);
}
.btn--primary:hover {
  background: var(--c-primary-light);
  color: var(--c-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(27, 127, 212, 0.35);
}
.btn--ghost {
  background: transparent;
  color: var(--c-white);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--c-white);
  border-color: var(--c-white);
}
.btn--block { display: flex; width: 100%; justify-content: center; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--c-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.topbar__inner {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.topbar__info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar__info span { display: inline-flex; align-items: center; gap: 6px; }
.topbar__info svg { color: rgba(255, 255, 255, 0.65); }

.topbar__lang { display: flex; gap: 4px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s var(--ease);
}
.lang-btn:hover { color: var(--c-white); }
.lang-btn.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--c-white);
}
.lang-flag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 10px; font-weight: 700;
}

/* ---------- Header / Nav ---------- */
.header {
  position: fixed;
  top: var(--topbar-h); left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  z-index: 99;
  transition: all 0.3s var(--ease);
}
.header.is-scrolled {
  box-shadow: var(--shadow-md);
}
.header__inner {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.logo {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--c-text);
  /* LOGO 图形+文字宽度都是固定的, 不参与收缩; 页头空间不足时由导航侧压缩 */
  flex-shrink: 0;
  min-width: 0;
}
.logo__text {
  display: flex; flex-direction: column; line-height: 1.1;
  /* 关键: 文字块是 nowrap 的, 一旦被 flex 压缩就会「溢出自身盒子」压到导航上,
     所以必须 flex-shrink:0 保住自然宽度, 让导航侧去消化挤压。 */
  flex-shrink: 0;
  /* 中文全称较长, 任何一行都不许折行——否则会把导航挤成竖排 */
  white-space: nowrap;
}
.logo__text strong {
  font-size: 15px; font-weight: 700; color: var(--c-primary);
  letter-spacing: 0.2px;
}
.logo__text small {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  color: var(--c-text-soft); text-transform: uppercase;
}
.logo__text--light strong, .logo__text--light small { color: var(--c-white); }

/* 公司 LOGO 图片（原为内联 SVG 图标）。页头白底用彩色版；
   页脚深底改用白色版，否则 LOGO 的蓝色字会糊在深蓝背景上。 */
.logo__img { height: 38px; width: auto; display: block; flex-shrink: 0; }
.logo__img--light { height: 34px; }
/* 窄屏优先保导航：文字块整块隐藏, 只留 LOGO 图形。
   阈值依据(实测)：页头 7 个导航项 + LOGO 图形(174) + 文字块(中167/英154) 三者同时
   排下时, 中文需 ~1180px、英文需 ~1280px；低于此文字块会贴住首个导航项,
   所以统一在 1200px 以下隐藏文字块。 */
@media (max-width: 1200px) {
  .header .logo__text { display: none; }
}
/* 英文导航项更长, 1200-1280 这段用更小的内距换空间, 避免刚露出文字就又打架 */
html[lang="en"] .nav__link { padding: 10px 10px; }
@media (max-width: 900px) {
  .logo__img { height: 32px; }
  .logo__img--light { height: 30px; }
  .logo__text strong { font-size: 14px; }
}

.nav__list {
  display: flex; align-items: center; gap: 4px;
}
.nav__link {
  position: relative;
  display: inline-block;
  padding: 10px 13px;
  font-size: 14.5px; font-weight: 500;
  color: var(--c-text);
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
  /* 英文导航项(Case Studies / Technical Resources)比中文长, 必须禁止折行,
     否则会被挤成两行把页头撑高 */
  white-space: nowrap;
}
.nav__link::after {
  content: ''; position: absolute;
  left: 16px; right: 16px; bottom: 6px;
  height: 2px;
  background: var(--c-primary-light);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease);
}
.nav__link:hover { color: var(--c-primary); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link--cta {
  margin-left: 12px;
  background: var(--c-primary);
  color: var(--c-white) !important;
  padding: 10px 22px;
  border-radius: var(--radius);
}
.nav__link--cta::after { display: none; }
.nav__link--cta:hover {
  background: var(--c-primary-light);
  color: var(--c-white) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  flex-direction: column; justify-content: center; align-items: center;
  gap: 4px;
}
.nav-toggle span {
  width: 18px; height: 2px; background: var(--c-primary); border-radius: 2px;
  transition: 0.25s var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 640px;
  color: var(--c-white);
  overflow: hidden;
  margin-top: calc(-1 * (var(--header-h) + var(--topbar-h)));
  padding-top: calc(var(--header-h) + var(--topbar-h));
}
.hero__bg {
  position: absolute; inset: 0;
  background-image: url('../img/hero.png');
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      rgba(6, 31, 74, 0.92) 0%,
      rgba(11, 61, 145, 0.85) 30%,
      rgba(11, 61, 145, 0.55) 55%,
      rgba(11, 61, 145, 0.25) 100%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  padding: 90px 0 110px;
}
.hero__content {
  max-width: 640px;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 188, 212, 0.16);
  border: 1px solid rgba(0, 188, 212, 0.4);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: #b3f0fa;
  margin-bottom: 24px;
}
.hero__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.25);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.hero__title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--c-white);
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}
.hero__title span { display: block; }
.hero__desc {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
  max-width: 580px;
}
.hero__cta {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.hero__badges {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.badge {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}
.hero__scroll {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  z-index: 3;
}
.hero__scroll span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  background: white;
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollHint 1.8s ease infinite;
}
@keyframes scrollHint {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 14px); opacity: 0; }
}

/* ---------- Stats ---------- */
.stats {
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 36px 24px;
  gap: 16px;
}
.stat {
  text-align: center;
  padding: 16px 8px;
  position: relative;
}
.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -8px; top: 20%; bottom: 20%;
  width: 1px;
  background: var(--c-border);
}
.stat__num {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  color: var(--c-primary);
  line-height: 1;
  display: inline-block;
}
.stat__suffix {
  display: inline-block;
  margin-left: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--c-primary-light);
  vertical-align: top;
  padding-top: 6px;
}
.stat__label {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--c-text-soft);
  letter-spacing: 0.5px;
}

/* ---------- Section common ---------- */
.section {
  padding: 88px 0;
}
.section--alt {
  background: var(--c-bg-alt);
}
.section--dark {
  background:
    radial-gradient(ellipse at top right, rgba(27, 127, 212, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, var(--c-bg-dark) 0%, var(--c-primary-dark) 100%);
  color: var(--c-white);
}
.section--dark .section__title,
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--c-white); }
.section--dark .section__subtitle { color: rgba(255, 255, 255, 0.7); }

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section__head--light .eyebrow {
  background: rgba(0, 188, 212, 0.15);
  color: #b3f0fa;
  border-color: rgba(0, 188, 212, 0.4);
}
.eyebrow {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(11, 61, 145, 0.08);
  color: var(--c-primary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(11, 61, 145, 0.15);
  margin-bottom: 16px;
}
.section__title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}
.section__subtitle {
  font-size: 16px;
  color: var(--c-text-soft);
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: center;
}
.about__visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1;
}
.about__lead {
  font-size: 17px;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 3px solid var(--c-primary);
}
.about__text {
  font-size: 14.5px;
  color: var(--c-text-soft);
  margin-bottom: 32px;
  line-height: 1.85;
}
.about__features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 28px;
}
.feature {
  display: flex; gap: 14px;
}
.feature__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
  color: white;
  display: flex; align-items: center; justify-content: center;
}
.feature h4 {
  font-size: 15px;
  margin-bottom: 4px;
}
.feature p {
  font-size: 13px;
  color: var(--c-text-soft);
  line-height: 1.6;
}

/* ---------- Products ---------- */
.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 28px;
  align-items: stretch;
}
.product-card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  transition: all 0.3s var(--ease);
  display: flex; flex-direction: column;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-primary-light);
}
.product-card__media {
  aspect-ratio: 1 / 1;
  background: var(--c-bg-alt);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.product-card__media svg { width: 100%; height: 100%; display: block; }
.product-card__media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product-card__body {
  padding: 24px;
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 200px;
}
.product-card__tag {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  background: rgba(11, 61, 145, 0.08);
  color: var(--c-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 4px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.product-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--c-text);
  line-height: 1.4;
  /* reserve 2 lines so titles align across cards */
  min-height: calc(1.4em * 2);
  flex-shrink: 0;
}
.product-card p {
  font-size: 14px;
  color: var(--c-text-soft);
  line-height: 1.7;
  margin-bottom: 16px;
}
.link-arrow {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-primary);
  margin-top: auto;
  align-self: flex-start;
  display: inline-block;
}
.link-arrow:hover { color: var(--c-primary-light); }

/* ---------- Applications ---------- */
.apps__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.app-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px 22px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: all 0.25s var(--ease);
  color: var(--c-text);
}
.app-card:hover {
  border-color: var(--c-primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(180deg, #fff 0%, #f5f9ff 100%);
}
.app-card__icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(11, 61, 145, 0.1), rgba(27, 127, 212, 0.18));
  color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s var(--ease);
}
.app-card:hover .app-card__icon {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
  color: var(--c-white);
}
.app-card h4 {
  font-size: 15.5px;
  margin-bottom: 4px;
}
.app-card p {
  font-size: 12.5px;
  color: var(--c-text-soft);
  line-height: 1.6;
}

/* ---------- Technology ---------- */
.tech__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 64px;
}
.tech-stat {
  text-align: center;
  padding: 32px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
}
.tech-stat__num {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  color: var(--c-white);
  line-height: 1;
}
.tech-stat__num small {
  font-size: 0.5em;
  color: var(--c-accent);
  margin-left: 2px;
  vertical-align: top;
  padding-top: 0.3em;
  display: inline-block;
}
.tech-stat__label {
  margin-top: 10px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- Case studies (home) ---------- */
.cases__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.case-card {
  padding: 26px 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.case-card:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 174, 255, 0.45);
  background: rgba(255, 255, 255, 0.07);
}
.case-card__tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(74, 174, 255, 0.14);
  border: 1px solid rgba(74, 174, 255, 0.35);
  color: var(--c-accent);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.case-card h4 {
  font-size: 16.5px;
  color: var(--c-white);
  margin-bottom: 8px;
}
.case-card p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
}
/* Full-width featured case card: text on top, image below */
.case-card--wide {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.case-card--wide .case-card__content {
  flex: 0 0 auto;
  min-width: 0;
  padding: 28px 28px 22px;
}
.case-card--wide .case-card__content p {
  margin: 0;
  max-width: 900px;
}
.case-card--wide .case-card__imgwrap {
  flex: 0 0 auto;
  width: 100%;
  line-height: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
}
.case-card--wide .case-card__imgwrap img {
  display: block;
  width: 64%;            /* shrink featured photos by ~20% again (was 80% -> 64%) */
  height: auto;          /* keep native ratio (livestock card uses this, no crop) */
}
/* the three field photos (power / surface / seawater) may be cropped tighter */
.case-card--wide.case-card--crop .case-card__imgwrap img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
@media (max-width: 900px) {
  .cases__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .case-card--wide .case-card__content { padding: 22px 20px 18px; }
  .case-card--wide .case-card__imgwrap { display: block; }
  .case-card--wide .case-card__imgwrap img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: initial;
  }
}
@media (max-width: 560px) {
  .cases__grid { grid-template-columns: 1fr; }
}

/* ---------- Downloads page ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.dl-card {
  display: flex; align-items: center; gap: 14px;
  padding: 20px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  text-decoration: none;
  color: inherit;
}
.dl-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-primary-light);
}
.dl-card__icon {
  flex: 0 0 52px;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: #eef4fc;
  color: var(--c-primary);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.dl-card__body { flex: 1; min-width: 0; }
.dl-card__body h4 { font-size: 14.5px; color: var(--c-text); margin-bottom: 4px; }
.dl-card__body p { font-size: 12px; color: var(--c-text-soft); }
.dl-card .btn { flex: 0 0 auto; }
.dl-card--img {
  align-items: stretch;
  flex-direction: column;
  text-align: left;
}
.dl-card--img img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  background: #f2f5fa;
}
.dl-card--img .dl-card__body { margin-top: 10px; }
.dl-card--img .btn { align-self: flex-start; margin-top: 12px; }
@media (max-width: 900px) {
  .dl-grid, .dl-grid--img { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .dl-grid, .dl-grid--img { grid-template-columns: 1fr; }
}

/* ---------- Downloads: brand groups (KaiTron Mata Flow / Liqua Flow) ---------- */
.dl-group + .dl-group { margin-top: 46px; }
.dl-group__head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  margin-bottom: 16px;
}
.dl-group__brand {
  display: inline-flex; align-items: center;
  margin: 0;
  padding: 5px 14px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.3px;
  line-height: 1.5;
  border-radius: 999px;
  background: #eef4fc;
  color: var(--c-primary);
  border: 1px solid rgba(11, 61, 145, 0.12);
}
.dl-group__brand--alt {
  background: #e8f8fb;
  color: #0a6c7c;
  border-color: rgba(0, 188, 212, 0.22);
}
.dl-group__desc {
  flex: 1 1 340px; min-width: 0;
  margin: 0;
  font-size: 13px; line-height: 1.65;
  color: var(--c-text-soft);
  /* 中英混排时「（Inside-out）」这类长串默认不可断行, 会顶出盒子被裁切 */
  overflow-wrap: anywhere;
}
.dl-group .dl-grid { margin-bottom: 0; }
/* 锚点跳转(如 download.html#materials)时避开吸顶导航, 否则标题被盖住 */
.section[id] { scroll-margin-top: 100px; }
/* 窄屏下说明文字独占一行, 否则会和品牌芯片挤在同一行、正文被压缩后越出容器右内边距 */
@media (max-width: 700px) {
  .dl-group__head { align-items: flex-start; }
  .dl-group__desc { flex-basis: 100%; }
}
/* 4 张卡片的品牌组用两列排布，比 3 列更整齐 */
.dl-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .dl-grid--2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .dl-grid--2 { grid-template-columns: 1fr; }
}

/* ---------- Downloads: coming-soon section ---------- */
.dl-coming {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dl-coming__item {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 20px;
  background: var(--c-white);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease);
}
.dl-coming__item:hover { border-color: var(--c-primary-light); }
.dl-coming__tag {
  align-self: flex-start;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef4fc; color: var(--c-primary);
}
.dl-coming__item h4 { font-size: 15px; color: var(--c-text); }
.dl-coming__item p {
  margin-top: auto;
  font-size: 12px; font-weight: 600;
  color: var(--c-text-soft);
}
.dl-coming__cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 22px 20px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.dl-coming__cta:hover { background: var(--c-primary-dark); transform: translateY(-2px); }
.dl-coming__cta svg { transition: transform 0.2s var(--ease); }
.dl-coming__cta:hover svg { transform: translateX(3px); }
@media (max-width: 900px) {
  .dl-coming { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .dl-coming { grid-template-columns: 1fr; }
}

/* ---------- Cert image lightbox (download page) ---------- */
.dl-card--img { cursor: zoom-in; }
.dl-card--img:focus-visible { outline: 2px solid var(--c-primary-light); outline-offset: 4px; }

.cert-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
  background: rgba(8, 18, 36, 0.86);
  backdrop-filter: blur(4px);
  animation: cert-lb-fade 0.18s ease-out;
}
.cert-lightbox[hidden] { display: none; }
.cert-lightbox__overlay { position: absolute; inset: 0; cursor: zoom-out; }
.cert-lightbox__inner {
  position: relative;
  max-width: 92vw; max-height: 88vh;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.cert-lightbox__inner img {
  max-width: 92vw; max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.45);
}
.cert-lightbox__close {
  position: absolute;
  top: -16px; right: -16px;
  width: 42px; height: 42px;
  border: 0; border-radius: 50%;
  background: #fff; color: #1a2233;
  font-size: 24px; line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s var(--ease);
}
.cert-lightbox__close:hover { transform: scale(1.06); }
.cert-lightbox__caption {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  text-align: center;
  max-width: 80vw;
}
@keyframes cert-lb-fade { from { opacity: 0; } to { opacity: 1; } }

.tech__flow { margin-bottom: 56px; }
.tech__flow-title {
  text-align: center;
  font-size: 22px;
  color: var(--c-white);
  margin-bottom: 32px;
}
.flow {
  display: flex; align-items: stretch; justify-content: space-between;
  gap: 8px;
}
.flow__step {
  flex: 1;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  text-align: center;
}
.flow__num {
  font-size: 26px;
  font-weight: 800;
  color: var(--c-accent);
  margin-bottom: 8px;
}
.flow__step h4 {
  font-size: 15px;
  color: var(--c-white);
  margin-bottom: 6px;
}
.flow__step p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.flow__arrow {
  display: flex; align-items: center;
  font-size: 22px;
  color: rgba(0, 188, 212, 0.6);
  font-weight: 300;
  padding: 0 4px;
}

.certs {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cert {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 212, 0.2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}
.cert:nth-child(odd) {
  border-color: rgba(0, 188, 212, 0.3);
}

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}
.contact__info {
  display: flex; flex-direction: column; gap: 24px;
}
.info-item {
  display: flex; gap: 16px;
  padding: 20px;
  background: var(--c-bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
}
.info-item__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
  color: white;
  display: flex; align-items: center; justify-content: center;
}
.info-item h5 {
  font-size: 13px;
  color: var(--c-text-soft);
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.info-item p {
  font-size: 14.5px;
  color: var(--c-text);
  font-weight: 500;
}

.contact__form {
  padding: 36px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-white);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--c-primary-light);
  box-shadow: 0 0 0 3px rgba(27, 127, 212, 0.15);
}
.form-field textarea { resize: vertical; }

.form-msg {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}
.form-msg--ok {
  background: #e7f7ee;
  color: #0c6b3f;
  border: 1px solid #b7e6cf;
}
.form-msg--err {
  background: #fdecec;
  color: #b3261e;
  border: 1px solid #f5c2c0;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--c-bg-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 0;
  font-size: 14px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer__brand .logo { margin-bottom: 20px; }
.footer__intro {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
}
.footer__col h5 {
  color: var(--c-white);
  font-size: 15px;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}
.footer__col h5::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 24px; height: 2px;
  background: var(--c-accent);
}
.footer__col ul li {
  margin-bottom: 10px;
}
.footer__col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13.5px;
  transition: color 0.2s var(--ease);
}
.footer__col a:hover { color: var(--c-accent); }
.footer__contact li {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
}
.footer__links { display: flex; gap: 18px; }
.footer__links a { color: rgba(255, 255, 255, 0.5); }
.footer__links a:hover { color: var(--c-accent); }

/* ---------- Back to top ---------- */
.back-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-white);
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s var(--ease);
  z-index: 50;
}
.back-top.show {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.back-top:hover { background: var(--c-primary-light); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .products__grid { grid-template-columns: repeat(2, 1fr); }
  .apps__grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__visual { max-width: 480px; margin: 0 auto; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .tech__stats { grid-template-columns: repeat(2, 1fr); }
  .tech-stat:last-child { grid-column: 1 / -1; } /* 3 stats: last one spans */
  .flow { flex-wrap: wrap; }
  .flow__arrow { display: none; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  body { font-size: 14.5px; }
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }

  /* nav mobile */
  .nav {
    position: fixed;
    top: calc(var(--header-h) + var(--topbar-h));
    left: 0; right: 0;
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-110%);
    transition: transform 0.3s var(--ease);
    z-index: 98;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 0;
  }
  .nav__link {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-border);
  }
  .nav__link::after { display: none; }
  .nav__link--cta {
    margin: 12px 0 0;
    text-align: center;
  }
  .nav-toggle { display: flex; }

  /* topbar mobile */
  .topbar__info span:nth-child(2) { display: none; }

  /* hero */
  .hero { min-height: 520px; }
  .hero__inner { padding: 60px 0 90px; }
  .hero__title { font-size: clamp(28px, 7vw, 36px); }
  .hero__desc { font-size: 15px; }
  .hero__overlay {
    background: linear-gradient(180deg,
      rgba(6, 31, 74, 0.92) 0%,
      rgba(11, 61, 145, 0.85) 70%,
      rgba(11, 61, 145, 0.7) 100%);
  }
  .hero__scroll { display: none; }

  /* stats */
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 24px 16px;
  }
  .stat:not(:last-child)::after { display: none; }
  .stat:nth-child(odd)::after {
    display: block; right: -8px;
  }
  /* 3 stats: last one spans the full row, no stray divider */
  .stat:last-child { grid-column: 1 / -1; }
  .stat:last-child::after { display: none; }

  /* about */
  .about__features { grid-template-columns: 1fr; }

  /* products */
  .products__grid { grid-template-columns: 1fr; }

  /* tech */
  .tech__stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tech-stat { padding: 24px 12px; }

  /* contact */
  .contact__form { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }

  /* footer */
  .footer__grid { grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .topbar__lang .lang-btn span:not(.lang-flag) { display: none; }
  .btn { padding: 12px 22px; font-size: 14px; }
}

/* ============================================================
   Sub-pages (products / product-detail / applications)
   ============================================================ */

.nav__link.is-active {
  color: var(--c-primary);
  font-weight: 700;
}
.nav__link.is-active::after { transform: scaleX(1); }

/* ---------- Page banner ---------- */
.page-banner {
  margin-top: calc(-1 * (var(--header-h) + var(--topbar-h)));
  padding-top: calc(var(--header-h) + var(--topbar-h) + 64px);
  padding-bottom: 64px;
  background:
    radial-gradient(ellipse at top right, rgba(27, 127, 212, 0.35) 0%, transparent 55%),
    linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 60%, var(--c-primary-light) 100%);
  color: var(--c-white);
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.65);
}
.breadcrumb a { color: rgba(255, 255, 255, 0.8); }
.breadcrumb a:hover { color: var(--c-white); }
.breadcrumb__sep { color: rgba(255, 255, 255, 0.4); }
.page-banner__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--c-white);
  margin-bottom: 12px;
}
.page-banner__title--sm { font-size: clamp(22px, 3vw, 30px); }
.page-banner__sub {
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
}

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(ellipse at bottom left, rgba(0, 188, 212, 0.25) 0%, transparent 55%),
    linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  padding: 56px 0;
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 {
  color: var(--c-white);
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 8px;
}
.cta-band p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14.5px;
}

/* ---------- Buttons (sub-page variants) ---------- */
.btn--sm { padding: 10px 20px; font-size: 13.5px; }
.btn--outline {
  background: var(--c-white);
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn--outline:hover {
  background: var(--c-primary);
  color: var(--c-white);
  transform: translateY(-2px);
}

/* ---------- Product list page ---------- */
.product-card--wide {
  flex-direction: row;
  align-items: stretch;
}
.product-card--wide .product-card__media {
  flex: 0 0 320px;
  aspect-ratio: auto;
  height: 300px; /* more room for tall portrait product photos */
}
.product-card--wide .product-card__body { padding: 28px; }
.product-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.chip {
  display: inline-block;
  padding: 5px 12px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--c-text-soft);
}

/* ---------- Product detail ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 48px;
  align-items: center;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
}
.detail-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain; /* keeps very tall product photos inside the box, no cropping */
}
.detail-media svg { width: 100%; height: auto; display: block; }
.detail-info .product-card__tag { margin-bottom: 14px; }
.detail-title {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}
.detail-intro {
  font-size: 15px;
  line-height: 1.8;
  color: var(--c-text-soft);
  margin-bottom: 28px;
}
.detail-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.detail-section { margin-bottom: 40px; }
.detail-h2 {
  font-size: 20px;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--c-primary);
}
.doc-sub {
  color: var(--c-text-soft);
  font-size: 13px;
  margin: -8px 0 20px;
}
.detail-section .dl-grid { margin-top: 4px; }
.spec-table {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.spec-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 12px 20px;
  border-bottom: 1px solid var(--c-border);
  font-size: 14px;
}
.spec-row:last-child { border-bottom: none; }
.spec-row:nth-child(odd) { background: var(--c-bg-alt); }
.spec-key { color: var(--c-text-soft); font-weight: 500; }
.spec-val { color: var(--c-text); font-weight: 600; }

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.check-list li {
  position: relative;
  padding: 8px 0 8px 28px;
  font-size: 14.5px;
  color: var(--c-text-soft);
  border-bottom: 1px dashed var(--c-border);
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 13px;
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b7fd4' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.not-found { text-align: center; padding: 60px 0; color: var(--c-text-soft); }

/* ---------- Applications page ---------- */
#applicationsRoot {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.app-block {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.25s var(--ease);
}
.app-block:hover {
  border-color: var(--c-primary-light);
  box-shadow: var(--shadow-md);
}
.app-block__icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
  color: var(--c-white);
  display: flex; align-items: center; justify-content: center;
}
.app-block__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.app-block__head h3 {
  font-size: 20px;
  color: var(--c-text);
}
.app-block__head span {
  font-size: 13.5px;
  color: var(--c-primary-light);
  font-weight: 500;
}
.app-block__desc {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--c-text-soft);
  margin-bottom: 20px;
}
.app-points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
  margin-bottom: 20px;
}
.app-point {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 14px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
.app-point b {
  font-size: 13px;
  color: var(--c-primary);
  white-space: nowrap;
}
.app-point span {
  font-size: 13px;
  color: var(--c-text);
}
.app-related {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.app-related__label {
  font-size: 13px;
  color: var(--c-text-soft);
  font-weight: 600;
}
.rel-chip {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--c-primary-light);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-primary);
  transition: all 0.2s var(--ease);
}
.app-block__more {
  margin-top: 22px;
}
.app-block__more .btn {
  padding: 10px 20px;
  font-size: 13.5px;
}
.rel-chip:hover {
  background: var(--c-primary);
  color: var(--c-white);
}

/* ---------- Application process flow images ---------- */
.app-flows {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 22px 0 4px;
}
.app-flow {
  margin: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-bg-soft);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.app-flow:hover {
  box-shadow: 0 10px 28px rgba(11, 61, 145, 0.12);
  transform: translateY(-2px);
}
.app-flow--full {
  grid-column: 1 / -1;
}
.app-flow img {
  display: block;
  width: 100%;
  height: auto;
}
.app-flow figcaption {
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text-soft);
  text-align: center;
  border-top: 1px solid var(--c-border);
}
@media (max-width: 640px) {
  .app-flows { grid-template-columns: 1fr; }
}

/* ---------- Sub-page responsive ---------- */
@media (max-width: 1024px) {
  .product-card--wide { flex-direction: column; }
  .product-card--wide .product-card__media {
    flex: none;
    aspect-ratio: 16/8;
    min-height: 0;
  }
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .detail-media { max-width: 460px; }
  .app-points { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .page-banner { padding-top: calc(var(--header-h) + var(--topbar-h) + 44px); padding-bottom: 44px; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
  .detail-columns { grid-template-columns: 1fr; gap: 0; }
  .spec-row { grid-template-columns: 1fr; gap: 4px; }
  .app-block { grid-template-columns: 1fr; gap: 16px; padding: 24px; }
  .app-block__icon { width: 56px; height: 56px; border-radius: 14px; }
  .detail-grid { padding: 20px; }
}
/* ============================================================
   Certificate badges & modal (click to view ISO certificates)
   ============================================================ */
.badge--link {
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.badge--link:hover {
  background: rgba(0, 188, 212, 0.22);
  border-color: var(--c-accent);
  transform: translateY(-2px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 31, 74, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal__panel {
  position: relative;
  z-index: 1;
  background: var(--c-white);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  padding: 32px;
  box-shadow: 0 24px 64px rgba(6, 31, 74, 0.3);
  animation: modalIn 0.25s var(--ease);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-white);
  color: var(--c-text-soft);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.modal__close:hover {
  color: var(--c-white);
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.modal__title {
  font-size: 19px;
  margin-bottom: 20px;
  padding-right: 40px;
}
.modal__body { text-align: center; }
.modal__body img {
  max-width: 100%;
  max-height: 64vh;
  margin: 0 auto;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}
.modal__missing {
  padding: 56px 16px;
  color: var(--c-text-soft);
  font-size: 14px;
}

@media (max-width: 768px) {
  .modal__panel { padding: 24px 18px; }
}

/* ============================================================
   Mobile Enhancement (added) — desktop layout is unchanged
   ============================================================ */

/* Guard against accidental horizontal overflow on phones */
body { overflow-x: hidden; overflow-x: clip; }
.back-top { bottom: max(24px, env(safe-area-inset-bottom)); }

/* Mobile nav backdrop + scroll lock (added) */
.nav-backdrop {
  position: fixed;
  inset: calc(var(--header-h) + var(--topbar-h)) 0 0 0;
  background: rgba(6, 31, 74, 0.45);
  z-index: 97;
}
body.nav-open { overflow: hidden; }

/* ---------- Small tablet / large phone (≤768) ---------- */
@media (max-width: 768px) {
  /* Mobile nav: scrollable if it ever grows tall; respect notch bottom */
  .nav {
    max-height: calc(100vh - var(--header-h) - var(--topbar-h));
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .nav__list { padding-bottom: 8px; }

  /* Hero CTAs become full-width, easy-to-tap targets */
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }

  /* CTA band button full width on mobile */
  .cta-band__inner { gap: 18px; }
  .cta-band__inner .btn { width: 100%; justify-content: center; }

  /* Process flow stacks vertically; arrows are meaningless when stacked */
  .flow { flex-direction: column; }
  .flow__step { width: 100%; }
  .flow__arrow { display: none; }

  /* Download cards: let the button drop to its own full-width row */
  .dl-card { flex-wrap: wrap; }
  .dl-card__body { flex: 1 1 100%; }
  .dl-card .btn { flex: 1 1 100%; justify-content: center; }

  /* Footer contact lines may contain long emails/phones */
  .footer__contact li,
  .footer__col a { overflow-wrap: anywhere; }
}

/* ---------- Phones (≤600) ---------- */
@media (max-width: 600px) {
  .apps__grid { grid-template-columns: 1fr; }
  .tech__stats { grid-template-columns: repeat(2, 1fr); }

  /* Top bar: trim icon + tighten spacing so the phone number always fits */
  .topbar { font-size: 11px; }
  .topbar__info { gap: 10px; }
  .topbar__info svg { display: none; }
  .topbar__lang .lang-btn { padding: 4px 8px; }

  /* Section heads a touch tighter */
  .section__head { margin-bottom: 40px; }
}

/* ---------- Small phones (≤380) ---------- */
@media (max-width: 380px) {
  :root { --header-h: 60px; }
  body { font-size: 14px; }
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .section { padding: 52px 0; }
  .stat__num { font-size: 28px; }
  .stat__suffix { font-size: 15px; }
  .hero__title { font-size: clamp(24px, 8vw, 30px); }
  .product-card__body { padding: 18px; }
  .btn { padding: 12px 18px; font-size: 14px; }
  .contact__form { padding: 20px 16px; }
  .detail-grid { padding: 16px; }
  .page-banner { padding-top: calc(var(--header-h) + var(--topbar-h) + 36px); padding-bottom: 36px; }
}

/* ============ Doc preview / registration modals ============ */
body.modal-open { overflow: hidden; }
.doc-modal { position: fixed; inset: 0; z-index: 1200; display: none; }
.doc-modal.is-open { display: block; }
.doc-modal__mask { position: absolute; inset: 0; background: rgba(10, 25, 60, 0.55); }
.doc-modal__box {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(960px, 92vw); height: 86vh;
  background: var(--c-white); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.doc-modal__box--sm { width: min(460px, 92vw); height: auto; max-height: 88vh; }
.doc-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; background: var(--c-primary, #0b3d91); color: #fff;
  flex: 0 0 auto;
}
.doc-modal__title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 16px; }
.doc-modal__close { background: none; border: none; color: #fff; cursor: pointer; padding: 4px; display: flex; border-radius: 6px; }
.doc-modal__close:hover { background: rgba(255, 255, 255, 0.15); }
.doc-modal__frame { flex: 1; width: 100%; border: none; background: #eef1f6; }
.reg-body { padding: 22px 24px 26px; overflow: auto; }
.reg-sub { font-size: 13px; color: var(--c-text-soft); margin: 0 0 18px; line-height: 1.6; }
.reg-form .form-field { margin-bottom: 14px; }
.reg-form .form-field label { display: block; font-size: 13px; font-weight: 600; color: var(--c-text); margin-bottom: 6px; }
.reg-form .form-field input {
  width: 100%; border: 1px solid var(--c-border); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; background: var(--c-white);
}
.reg-form .form-field input:focus { outline: none; border-color: var(--c-primary); }
.reg-msg { font-size: 13px; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; }
.reg-msg--ok { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.reg-msg--err { background: rgba(220, 38, 38, 0.10); color: #b91c1c; }
.reg-form__actions { display: flex; gap: 10px; margin-top: 18px; }
.reg-form__actions .btn { flex: 1; justify-content: center; }
