/* ==========================================================================
   Chenri Fan — Dongguan Hongchen Electronic Technology Co., Ltd.
   Refreshed design system: brand red → ember gradient, cool-tech neutrals,
   8px spacing, Sora display + Inter body, layered depth.
   ========================================================================== */
:root {
  /* Brand */
  --c-red:        #E20A2E;   /* primary brand red */
  --c-red-dark:   #B00721;
  --c-ember:      #FF6A3D;   /* heat-dissipation accent */
  --c-ember-soft: #FFB199;
  --c-green:      #12A15A;

  /* Cool-tinted neutrals (tech / cooling feel) */
  --c-ink:        #13171E;
  --c-body:       #47535F;
  --c-muted:      #6B7786;
  --c-line:       #E8ECF1;
  --c-bg:         #FFFFFF;
  --c-bg-alt:     #F4F7FA;
  --c-dark:       #11151B;
  --c-dark-2:     #1B212A;
  --c-on-dark:    #F3F5F8;
  --c-on-dark-mut:#AAB3BE;

  /* Gradients */
  --grad-brand:      linear-gradient(135deg, #E20A2E 0%, #FF6A3D 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(226,10,46,0.14), rgba(255,106,61,0.14));

  /* Typography */
  --font:        "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display:"Sora", "Inter", "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;

  --fs-xs: 0.8125rem;  /* 13px */
  --fs-s:  0.9375rem;  /* 15px */
  --fs-b:  1rem;       /* 16px */
  --fs-m:  1.125rem;   /* 18px */
  --fs-l:  1.4375rem;  /* 23px */
  --fs-xl: 1.875rem;   /* 30px */
  --fs-2xl:2.375rem;   /* 38px */

  /* Motion */
  --t-fast: 0.2s;
  --t-med:  0.3s;
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);

  /* Elevation */
  --shadow-sm:  0 2px 8px rgba(17,21,27,0.06);
  --shadow:     0 12px 30px rgba(17,21,27,0.10);
  --shadow-lg:  0 20px 50px rgba(17,21,27,0.18);
  --radius:     12px;
  --radius-sm:  8px;
  --maxw:       1200px;
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-b);
  line-height: 1.65;
  color: var(--c-body);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--c-ink); line-height: 1.22; margin: 0 0 16px; letter-spacing: -0.01em; }
p  { margin: 0 0 16px; }
a  { color: var(--c-red); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--c-red); outline-offset: 2px; border-radius: 4px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--c-ink); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-s);
  border: 2px solid transparent;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn--primary {
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 10px 26px rgba(226,10,46,0.34);
}
.btn--primary:hover { filter: brightness(1.05); box-shadow: 0 14px 34px rgba(226,10,46,0.44); }
.btn--ghost { border-color: rgba(255,255,255,0.7); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,0.12); }
.btn--block { display: block; width: 100%; text-align: center; }

/* ===== Top bar ===== */
.topbar {
  background: var(--c-dark); color: var(--c-on-dark-mut);
  font-size: var(--fs-xs); position: relative;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,106,61,0.5), transparent);
}
.topbar__inner {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  align-items: center; justify-content: space-between; padding-block: 9px;
}
.topbar__note { margin: 0; letter-spacing: 0.02em; }
@media (max-width: 575px) { .topbar__note { display: none; } }
.topbar__links { display: flex; gap: 20px; }
.topbar__links a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--c-on-dark-mut);
}
.topbar__links a:hover { color: var(--c-ember-soft); text-decoration: none; }
.topbar__links svg { width: 14px; height: 14px; fill: currentColor; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.header.is-scrolled { box-shadow: 0 6px 22px rgba(17,21,27,0.10); background: rgba(255,255,255,0.96); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand__logo { height: 42px; width: 42px; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { font-family: var(--font-display); color: var(--c-ink); font-size: var(--fs-m); letter-spacing: -0.01em; }
.brand__text small { color: var(--c-muted); font-size: 11px; }

.nav { display: none; align-items: center; gap: 20px; }
.nav a {
  color: var(--c-ink); font-weight: 600; font-size: 0.875rem;
  padding: 6px 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--grad-brand);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-med) var(--ease);
}
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
.nav a:hover { text-decoration: none; }
.nav__cta {
  background: var(--grad-brand); color: #fff !important;
  padding: 10px 22px !important; border-radius: 999px;
  box-shadow: 0 8px 20px rgba(226,10,46,0.30);
}
.nav__cta::after { display: none; }
.nav__cta:hover { filter: brightness(1.05); box-shadow: 0 12px 28px rgba(226,10,46,0.40); }

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 10px;
}
.nav-toggle span {
  width: 24px; height: 2.5px; background: var(--c-ink); border-radius: 2px;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 991px) {
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow); padding: 8px 20px 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--c-line); }
  .nav a:last-child { border-bottom: 0; }
  .nav__cta { text-align: center; margin-top: 8px; }
}
@media (min-width: 992px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
}

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; background: var(--c-dark); isolation: isolate; }
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: right center;
  position: absolute; inset: 0; z-index: 0;
}
.hero::before { /* ember glow bleed from the right */
  content: ""; position: absolute; z-index: 1;
  right: -8%; top: 4%; width: 50%; height: 92%;
  background: radial-gradient(closest-side, rgba(255,106,61,0.46), rgba(226,10,46,0.10) 55%, transparent 76%);
  filter: blur(26px); pointer-events: none;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(100deg, rgba(15,18,23,0.97) 0%, rgba(15,18,23,0.85) 44%, rgba(15,18,23,0.32) 100%);
}
.hero__overlay::before { /* subtle engineering grid, fades to the right */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(105deg, transparent 40%, #000);
  mask-image: linear-gradient(105deg, transparent 40%, #000);
}
.hero__content {
  position: relative; z-index: 3;
  padding-block: 48px 36px; color: var(--c-on-dark);
}
.hero__eyebrow {
  color: var(--c-ember-soft); text-transform: uppercase;
  letter-spacing: 0.16em; font-size: var(--fs-xs); margin-bottom: 10px;
  font-weight: 600;
}
.hero h1 {
  color: #fff; font-size: var(--fs-xl); line-height: 1.18;
  max-width: 28ch; margin-bottom: 12px;
}
.hero h1 span {
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text;
  color: transparent; padding-right: 2px;
}
.hero__sub { max-width: 56ch; color: var(--c-on-dark-mut); margin-bottom: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.hero__stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius); overflow: hidden; max-width: 640px;
}
.hero__stats li { background: rgba(17,21,27,0.72); padding: 11px 16px; }
.hero__stats strong {
  display: block; font-family: var(--font-display); font-size: var(--fs-l);
  line-height: 1.1;
  background: linear-gradient(120deg, #ffffff, var(--c-ember-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__stats span { font-size: var(--fs-xs); color: var(--c-on-dark-mut); }

@media (min-width: 576px)  { .hero__stats { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px)  { .hero__content { padding-block: 64px 44px; } .hero h1 { font-size: var(--fs-2xl); } }
@media (min-width: 1200px) { .hero__content { padding-block: 72px 52px; } }

/* ===== Sections ===== */
.section { padding-block: 64px; position: relative; }
.section--alt {
  background: var(--c-bg-alt);
  background-image: radial-gradient(120% 90% at 100% 0%, rgba(255,106,61,0.06), transparent 55%);
}
.section--dark {
  background-color: var(--c-dark);
  background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1.4px);
  background-size: 24px 24px;
}
.section__head { max-width: 780px; margin-bottom: 40px; }
.section__head--light h2 { color: #fff; }
.section__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--c-red); font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.13em; font-size: var(--fs-xs); margin-bottom: 10px;
}
.section__kicker::before {
  content: ""; width: 30px; height: 3px; border-radius: 2px;
  background: var(--grad-brand);
}
.section__kicker--light { color: #FF8FA0; }
.section__head h2 { font-size: var(--fs-xl); }
.section__desc { color: var(--c-muted); }
.section__head--light .section__desc { color: var(--c-on-dark-mut); }
.section__more { margin-top: 32px; text-align: center; color: var(--c-muted); }
@media (min-width: 768px) { .section { padding-block: 88px; } .section__head h2 { font-size: var(--fs-2xl); } }

/* ===== Products ===== */
.filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter__btn {
  padding: 9px 22px; border-radius: 999px; border: 1.5px solid var(--c-line);
  background: #fff; color: var(--c-body); font-weight: 600; font-size: var(--fs-s);
  transition: all var(--t-fast) var(--ease);
}
.filter__btn:hover { border-color: var(--c-red); color: var(--c-red); }
.filter__btn.is-active { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(226,10,46,0.30); }

.products {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
@media (min-width: 768px)  { .products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .products { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

.product {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  overflow: hidden; text-align: center; padding-bottom: 16px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), opacity var(--t-med) var(--ease);
}
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(226,10,46,0.32); }
.product.is-hidden { display: none; }
.product figure {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 100% at 50% 0%, #ffffff, #eef1f5);
  padding: 8px; position: relative;
}
.product figure::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--grad-brand); transform: scaleX(0); transition: transform var(--t-med) var(--ease);
}
.product:hover figure::after { transform: scaleX(1); }
.product figure img { width: 100%; height: 100%; object-fit: contain; transition: transform var(--t-med) var(--ease); }
.product:hover figure img { transform: scale(1.06); }
.product h3 { font-family: var(--font-display); font-size: var(--fs-s); margin: 14px 12px 4px; }
.product p { font-size: var(--fs-xs); color: var(--c-muted); margin: 0 12px; }

/* ===== Series ===== */
.series {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
@media (min-width: 768px)  { .series { grid-template-columns: repeat(4, 1fr); } }
.series li {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.series li:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(226,10,46,0.32); }
.series img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.series span {
  display: block; padding: 12px 14px; font-family: var(--font-display); font-weight: 700;
  color: var(--c-ink); font-size: var(--fs-s); text-align: center;
}

/* ===== About ===== */
.about { display: grid; gap: 40px; }
@media (min-width: 992px) {
  .about { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 56px; }
}
.about h2 { font-size: var(--fs-xl); }
.about__tenet {
  font-family: var(--font-display); font-size: var(--fs-m); font-weight: 700; color: var(--c-red);
  border-left: 4px solid transparent; border-image: var(--grad-brand) 1;
  padding-left: 16px; margin-block: 20px;
}
.about__points { margin-bottom: 28px; }
.about__points li {
  position: relative; padding-left: 26px; margin-bottom: 8px; color: var(--c-ink);
}
.about__points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--c-green); font-weight: 800;
}
.about__media { position: relative; }
.about__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.about__media-2 {
  position: absolute; width: 52%; right: -8px; bottom: -32px;
  border: 5px solid #fff; border-radius: var(--radius);
  box-shadow: 0 0 0 2px rgba(255,106,61,0.5), var(--shadow-lg);
}
@media (max-width: 991px) { .about__media-2 { display: none; } }

/* ===== Factory ===== */
.factory { display: grid; gap: 32px; }
@media (min-width: 992px) { .factory { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; } }
.factory__photo img { border-radius: var(--radius); width: 100%; }
.factory__photo figcaption {
  margin-top: 12px; font-size: var(--fs-xs); color: var(--c-on-dark-mut);
}
.factory__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 576px) { .factory__grid { grid-template-columns: repeat(3, 1fr); } }
.factory__grid li {
  background: var(--c-dark-2); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 20px 16px; text-align: center;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.factory__grid li:hover { transform: translateY(-3px); border-color: rgba(255,106,61,0.45); }
.factory__grid strong { display: block; font-family: var(--font-display); font-size: var(--fs-xl); color: #fff; line-height: 1.1; }
.factory__grid span { font-size: var(--fs-xs); color: var(--c-on-dark-mut); }

/* ===== Applications ===== */
.apps {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 768px)  { .apps { grid-template-columns: repeat(4, 1fr); } }
.apps li {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--c-bg-alt); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 24px 12px; text-align: center;
  font-weight: 600; color: var(--c-ink); font-size: var(--fs-s);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.apps li:hover { transform: translateY(-4px); border-color: var(--c-red); box-shadow: var(--shadow-sm); }
.apps span { font-size: 1.75rem; line-height: 1; }

/* ===== Quality ===== */
.certs {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 48px;
}
@media (min-width: 992px) { .certs { grid-template-columns: repeat(4, 1fr); } }
.cert {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  text-align: center; padding: 28px 16px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.cert:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(226,10,46,0.32); }
.cert strong {
  display: block; font-family: var(--font-display); font-size: var(--fs-xl);
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 4px;
}
.cert span { font-size: var(--fs-xs); color: var(--c-muted); }

.why {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
@media (min-width: 768px)  { .why { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .why { grid-template-columns: repeat(4, 1fr); } }
.why li {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 24px; border-top: 4px solid var(--c-red);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.why li:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(226,10,46,0.32); border-top-color: var(--c-ember); }
.why h3 { font-family: var(--font-display); font-size: var(--fs-b); margin-bottom: 8px; }
.why p { font-size: var(--fs-s); color: var(--c-muted); margin: 0; }

/* ===== Inquiry ===== */
.inquiry { display: grid; gap: 40px; }
@media (min-width: 992px) { .inquiry { grid-template-columns: 0.9fr 1.1fr; gap: 64px; } }
.inquiry h2 { color: #fff; font-size: var(--fs-xl); }
.inquiry__intro p { color: var(--c-on-dark-mut); }
.inquiry__contact li {
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.10);
  color: var(--c-on-dark-mut); font-size: var(--fs-s);
}
.inquiry__contact a { color: var(--c-ember-soft); font-weight: 600; }
.inquiry__form {
  background: var(--c-dark-2); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 28px;
  box-shadow: inset 0 0 0 1px rgba(255,106,61,0.08);
}
.form__row { margin-bottom: 18px; }
.form__row--2 { display: grid; gap: 18px; }
@media (min-width: 576px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
label {
  display: block; font-size: var(--fs-xs); font-weight: 700;
  color: var(--c-on-dark); margin-bottom: 6px; letter-spacing: 0.02em;
}
input, textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: var(--fs-s);
  color: var(--c-on-dark); background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.16); border-radius: var(--radius-sm);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
input::placeholder, textarea::placeholder { color: rgba(170,179,190,0.6); }
input:focus, textarea:focus {
  outline: none; border-color: var(--c-ember); background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px rgba(255,106,61,0.18);
}
textarea { resize: vertical; }
.form__hint { font-size: var(--fs-xs); color: var(--c-on-dark-mut); margin: 14px 0 0; }
.form__hint.is-success { color: #5fd38d; font-weight: 600; }

/* ===== Footer ===== */
.footer {
  background-color: var(--c-dark);
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1.4px);
  background-size: 24px 24px;
  color: var(--c-on-dark-mut); border-top: 1px solid rgba(255,255,255,0.08);
}
.footer__grid {
  display: grid; grid-template-columns: 1fr; gap: 32px; padding-block: 48px 40px;
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1fr 1.15fr 1fr 1.2fr; } }
.footer h4 {
  color: #fff; font-family: var(--font-display); font-size: var(--fs-s); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 16px;
}
.footer a {
  display: block; color: var(--c-on-dark-mut);
  padding-block: 5px; font-size: var(--fs-s);
}
.footer a:hover { color: var(--c-ember-soft); text-decoration: none; }
.footer p { font-size: var(--fs-s); margin-bottom: 8px; }
.footer p a { display: inline; padding: 0; }
.footer__bar {
  border-top: 1px solid rgba(255,255,255,0.08); padding-block: 20px;
  font-size: var(--fs-xs); text-align: center; color: var(--c-on-dark-mut);
}
.footer__bar p { margin: 0; }

/* ===== Back to top ===== */
.totop {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--grad-brand); color: #fff; font-size: 1.25rem; font-weight: 700;
  box-shadow: 0 10px 26px rgba(226,10,46,0.40); opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease),
              visibility var(--t-med), filter var(--t-fast) var(--ease);
}
.totop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.totop:hover { filter: brightness(1.08); }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .product:hover, .product:hover figure img, .series li:hover,
  .cert:hover, .why li:hover, .apps li:hover, .factory__grid li:hover { transform: none; }
}

/* ==========================================================================
   Sub-pages: shared hero, breadcrumbs, blog, FAQ knowledge base, articles
   ========================================================================== */

/* ----- Subpage hero (dark, ember glow + grid, matches homepage hero) ----- */
.subpage-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--c-dark); color: var(--c-on-dark);
}
.subpage-hero::before {
  content: ""; position: absolute; z-index: 0;
  right: -10%; top: -40%; width: 55%; height: 180%;
  background: radial-gradient(closest-side, rgba(255,106,61,0.34), rgba(226,10,46,0.08) 55%, transparent 76%);
  filter: blur(26px); pointer-events: none;
}
.subpage-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(105deg, transparent 45%, #000);
  mask-image: linear-gradient(105deg, transparent 45%, #000);
}
.subpage-hero__inner { position: relative; z-index: 1; padding-block: 52px 48px; }
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: var(--fs-xs); color: var(--c-on-dark-mut); margin-bottom: 20px;
}
.crumbs a { color: var(--c-on-dark-mut); }
.crumbs a:hover { color: var(--c-ember-soft); text-decoration: none; }
.crumbs span { opacity: 0.5; }
.crumbs em { font-style: normal; color: #fff; font-weight: 600; }
.subpage-hero h1 { color: #fff; font-size: var(--fs-xl); max-width: 24ch; margin-bottom: 12px; }
.subpage-hero__lead { color: var(--c-on-dark-mut); max-width: 64ch; margin-bottom: 8px; }
.subpage-hero__note { color: rgba(170,179,190,0.85); font-size: var(--fs-s); max-width: 64ch; }
@media (min-width: 768px) {
  .subpage-hero__inner { padding-block: 68px 58px; }
  .subpage-hero h1 { font-size: var(--fs-2xl); }
}

/* ----- Blog cards ----- */
.blog-grid { display: grid; gap: 20px; }
@media (min-width: 576px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px)  { .blog-grid { grid-template-columns: repeat(3, 1fr); } }
.blog-card {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(226,10,46,0.32); text-decoration: none; }
.blog-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--fs-xs); color: var(--c-muted); margin: 0; }
.blog-card__tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--grad-brand-soft); color: var(--c-red); font-weight: 700;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
}
.blog-card h3 { font-size: var(--fs-m); margin: 0; }
.blog-card p:not(.blog-card__meta) { font-size: var(--fs-s); color: var(--c-muted); margin: 0; }
.blog-card__more { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: var(--fs-s); color: var(--c-red); }

/* ----- FAQ knowledge base ----- */
.faq-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.faq-jump a {
  padding: 9px 22px; border-radius: 999px; border: 1.5px solid var(--c-line);
  background: #fff; color: var(--c-body); font-weight: 600; font-size: var(--fs-s);
  transition: all var(--t-fast) var(--ease);
}
.faq-jump a:hover { border-color: var(--c-red); color: var(--c-red); text-decoration: none; }
.faq-groups { display: grid; gap: 44px; max-width: 880px; }
.faq-group h2 { display: flex; align-items: center; gap: 12px; font-size: var(--fs-l); margin-bottom: 18px; }
.faq-count {
  font-family: var(--font); font-size: var(--fs-xs); font-weight: 600; color: var(--c-muted);
  background: var(--c-bg-alt); border: 1px solid var(--c-line);
  padding: 2px 10px; border-radius: 999px; white-space: nowrap;
}
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.faq-item[open] { border-color: rgba(226,10,46,0.35); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 18px 20px;
  font-weight: 600; color: var(--c-ink); font-size: var(--fs-s);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.5rem; line-height: 1; color: var(--c-red);
  font-weight: 700; flex-shrink: 0; transition: transform var(--t-med) var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item__body { padding: 0 20px 20px; color: var(--c-body); font-size: var(--fs-s); }
.faq-item__body p:last-child { margin-bottom: 0; }
.faq-item__body ul { list-style: disc; padding-left: 20px; margin: 0 0 16px; }
.faq-item__body li { margin-bottom: 6px; }

/* ----- Article pages ----- */
.article-shell { max-width: 800px; margin-inline: auto; }
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  color: var(--c-on-dark-mut); font-size: var(--fs-xs); margin-top: 14px;
}
.article-body h2 { font-size: var(--fs-l); margin-top: 40px; }
.article-body h3 { font-size: var(--fs-m); margin-top: 28px; }
.article-body ul { list-style: disc; padding-left: 22px; margin: 0 0 16px; }
.article-body ol { padding-left: 22px; margin: 0 0 16px; }
.article-body li { margin-bottom: 8px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: var(--fs-s); }
.article-body th, .article-body td { border: 1px solid var(--c-line); padding: 10px 14px; text-align: left; }
.article-body th { background: var(--c-bg-alt); color: var(--c-ink); font-weight: 700; }
.article-body blockquote {
  margin: 0 0 16px; padding: 16px 20px;
  border-left: 4px solid var(--c-ember); background: var(--c-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--c-ink); font-weight: 500;
}

/* ----- CTA band on sub-pages ----- */
.page-cta {
  margin-top: 48px; background: var(--grad-brand); border-radius: var(--radius);
  padding: 32px; color: #fff; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 20px;
}
.page-cta h2 { color: #fff; margin: 0; font-size: var(--fs-m); }
.page-cta p { margin: 4px 0 0; color: rgba(255,255,255,0.92); font-size: var(--fs-s); }
.page-cta .btn--white { background: #fff; color: var(--c-red); box-shadow: 0 10px 24px rgba(17,21,27,0.18); }
.page-cta .btn--white:hover { filter: none; transform: translateY(-2px) scale(1.02); }

/* ----- Homepage FAQ teaser ----- */
.faq-teaser { display: grid; gap: 20px; }
@media (min-width: 768px) { .faq-teaser { grid-template-columns: repeat(3, 1fr); } }
.faq-card {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.faq-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(226,10,46,0.32); text-decoration: none; }
.faq-card h3 { font-size: var(--fs-b); margin: 0; }
.faq-card p { font-size: var(--fs-s); color: var(--c-muted); margin: 0; }
.faq-card__more { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: var(--fs-s); color: var(--c-red); }

/* ==========================================================================
   Homepage only — "Silver Industrial" theme override (DO NOT affect subpages)
   Steel-blue / brushed-silver cool palette, metallic depth, no warm ember.
   ========================================================================== */
body.theme-silver {
  /* Accent = anodized steel-blue, cool steel for secondary */
  --c-red:        #2F69A8;
  --c-red-dark:   #1E4A78;
  --c-ember:      #6E8395;
  --c-ember-soft: #B7C4D1;
  --c-green:      #2E8B6B;

  /* Cool, slightly blue-tinted neutrals (brushed-metal feel) */
  --c-ink:        #1B2127;
  --c-body:       #46535F;
  --c-muted:      #76828F;
  --c-line:       #DCE2E9;
  --c-bg:         #FFFFFF;
  --c-bg-alt:     #EDF0F3;
  --c-dark:       #161B21;
  --c-dark-2:     #212833;
  --c-on-dark:    #E9EFF4;
  --c-on-dark-mut:#9BAAB6;

  /* Metallic gradient: steel-blue → brushed silver */
  --grad-brand:       linear-gradient(135deg, #3A6EA5 0%, #9FB1C0 100%);
  --grad-brand-soft:  linear-gradient(135deg, rgba(58,110,165,0.12), rgba(159,177,192,0.12));

  --shadow-sm: 0 2px 8px rgba(22,27,33,0.08);
  --shadow:    0 12px 30px rgba(22,27,33,0.12);
  --shadow-lg: 0 20px 50px rgba(22,27,33,0.20);
}

/* Cold silver glow on the hero instead of warm ember */
body.theme-silver .hero::before {
  background: radial-gradient(closest-side, rgba(159,177,192,0.40), rgba(58,110,165,0.10) 55%, transparent 76%);
}
/* Silver hairline accents on the top bar + a polished metal rim on the header */
body.theme-silver .topbar::after {
  background: linear-gradient(90deg, transparent, rgba(159,177,192,0.55), transparent);
}
body.theme-silver .header {
  background: rgba(250,251,253,0.92);
  border-bottom: 1px solid var(--c-line);
}
body.theme-silver .header.is-scrolled {
  background: rgba(250,251,253,0.97);
  box-shadow: 0 6px 22px rgba(22,27,33,0.10), inset 0 -1px 0 rgba(159,177,192,0.5);
}
/* Cool steel glow on the alt section instead of ember */
body.theme-silver .section--alt {
  background-image: radial-gradient(120% 90% at 100% 0%, rgba(58,110,165,0.07), transparent 55%);
}
/* Swap warm-red hover borders for cool steel-blue across cards & lists */
body.theme-silver .product:hover { border-color: rgba(47,105,168,0.30); }
body.theme-silver .series li:hover { border-color: rgba(47,105,168,0.30); }
body.theme-silver .about__media-2 { box-shadow: 0 0 0 2px rgba(159,177,192,0.6), var(--shadow-lg); }
body.theme-silver .factory__grid li:hover { border-color: rgba(159,177,192,0.5); }
body.theme-silver .cert:hover { border-color: rgba(47,105,168,0.30); }
body.theme-silver .why li:hover { border-color: rgba(47,105,168,0.30); border-top-color: #3A6EA5; }
body.theme-silver .inquiry__form { box-shadow: inset 0 0 0 1px rgba(159,177,192,0.10); }
body.theme-silver .faq-card:hover { border-color: rgba(47,105,168,0.30); }
/* Brushed-metal product pedestal */
body.theme-silver .product figure {
  background: radial-gradient(120% 100% at 50% 0%, #ffffff, #e6eaef);
}
/* Focus ring matches the cool accent */
body.theme-silver :focus-visible { outline-color: var(--c-red); }


/* ===== Floating contact widget (Fanfasto) ===== */
.ff-wrap{position:fixed;right:22px;bottom:22px;z-index:2147483000;font-family:var(--font)}
.ff-fab{width:60px;height:60px;border:none;border-radius:50%;background:var(--grad-brand);color:#fff;cursor:pointer;box-shadow:var(--shadow-lg);display:flex;align-items:center;justify-content:center;transition:transform var(--t-fast) var(--ease),box-shadow var(--t-fast)}
.ff-fab:hover{transform:scale(1.06);box-shadow:0 22px 55px rgba(226,10,46,.42)}
.ff-fab svg{width:28px;height:28px;fill:currentColor}
.ff-fab .ff-close{display:none}
.ff-open .ff-fab .ff-chat{display:none}
.ff-open .ff-fab .ff-close{display:block}
.ff-panel{position:absolute;right:0;bottom:76px;width:272px;background:var(--c-bg);border-radius:16px;box-shadow:var(--shadow-lg);padding:14px;opacity:0;transform:translateY(10px) scale(.96);pointer-events:none;transition:opacity var(--t-med) var(--ease),transform var(--t-med) var(--ease)}
.ff-open .ff-panel{opacity:1;transform:none;pointer-events:auto}
.ff-panel h4{margin:2px 4px 12px;font-size:15px;color:var(--c-ink)}
.ff-item{display:flex;align-items:center;gap:12px;padding:10px;border-radius:10px;color:var(--c-body);font-size:14px;font-weight:500;text-decoration:none;transition:background var(--t-fast)}
.ff-item:hover{background:var(--c-bg-alt);text-decoration:none}
.ff-item .ff-ic{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;color:#fff}
.ff-item .ff-ic svg{width:20px;height:20px;fill:#fff}
.ff-ic--wa{background:#25D366}.ff-ic--mail{background:var(--c-red)}.ff-ic--tel{background:#0a7d4d}.ff-ic--quote{background:var(--c-ember)}
.ff-sub{font-size:12px;color:var(--c-muted);font-weight:400}
.ff-open .ff-panel{animation:ffPop var(--t-med) var(--ease)}
@keyframes ffPop{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}
@media (max-width:600px){
  .ff-wrap{left:0;right:0;bottom:0;padding:0}
  .ff-fab{position:fixed;right:16px;bottom:16px}
  .ff-panel{position:fixed;left:0;right:0;bottom:0;width:auto;border-radius:18px 18px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom))}
}
