:root {
  --blue: #003f97;
  --blue-deep: #002e70;
  --blue-soft: #eef6ff;
  --cyan: #18a8d8;
  --ink: #18243d;
  --muted: #647087;
  --line: #e7edf5;
  --paper: #ffffff;
  --bg: #f6f9fd;
  --shadow: 0 18px 45px rgba(11, 39, 86, 0.12);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 25px rgba(15, 47, 93, 0.08);
}

.top-strip {
  background: var(--blue-deep);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.top-strip__inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.top-strip nav {
  display: flex;
  gap: 22px;
}

.nav-bar {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 34px;
}

.brand {
  flex: 0 0 auto;
}

.brand img {
  width: 158px;
  height: auto;
}

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 600;
}

.nav-item {
  position: relative;
  padding: 28px 0;
}

.nav-item > a {
  transition: color 0.2s ease;
}

.nav-item:hover > a {
  color: var(--blue);
}

.mega-panel {
  position: absolute;
  left: 50%;
  top: calc(100% - 8px);
  width: 210px;
  transform: translateX(-50%) translateY(8px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.mega-panel a {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--muted);
}

.mega-panel a:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.nav-item:hover .mega-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-actions {
  display: flex;
  gap: 10px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.icon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 47, 93, 0.12);
}

.icon-button img {
  width: 22px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 18% 30%, rgba(16, 161, 217, 0.18), transparent 36%),
    linear-gradient(105deg, #eff8ff 0%, #f7fbff 38%, #d7e9ff 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("../assets/img/hero-banner.png");
  background-size: cover;
  background-position: center right;
  opacity: 0.82;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 80px 0 120px;
}

.eyebrow,
.section-title p {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  width: min(660px, 100%);
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: #0a2d62;
}

.hero__lead {
  width: min(560px, 100%);
  margin: 22px 0 34px;
  color: #48627e;
  font-size: 18px;
  line-height: 1.75;
}

.search-card {
  width: min(680px, 100%);
  display: flex;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.search-card input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 24px;
  background: transparent;
  color: var(--ink);
}

.search-card button,
.newsletter-form button {
  border: 0;
  border-radius: 999px;
  padding: 15px 32px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 20px rgba(0, 92, 190, 0.22);
}

.hero__quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero__quick-links a {
  padding: 8px 14px;
  border: 1px solid rgba(0, 63, 151, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 700;
}

.category-section {
  margin-top: -64px;
  position: relative;
  z-index: 3;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 18px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 55px rgba(11, 39, 86, 0.17);
}

.category-card img {
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.category-card strong {
  font-size: 18px;
}

.category-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

section {
  padding: 82px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 34px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.section-title--row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  text-align: left;
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
}

.feature-card {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #dceeff;
  box-shadow: var(--shadow);
}

.feature-card--large {
  grid-row: span 1;
}

.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 24, 67, 0.78));
}

.feature-card:hover img {
  transform: scale(1.05);
}

.feature-card__content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1;
  color: #fff;
}

.feature-card__content span {
  display: inline-block;
  margin-bottom: 8px;
  color: #9ee9ff;
  font-weight: 800;
}

.feature-card__content h3 {
  margin: 0 0 16px;
  font-size: 23px;
  line-height: 1.28;
}

.feature-card__content a {
  display: inline-flex;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.products-section {
  background: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f2f6fb;
}

.product-card div {
  padding: 20px;
}

.tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.product-card h3 {
  min-height: 72px;
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.4;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.research-card {
  position: relative;
  min-height: 216px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(11, 39, 86, 0.12);
}

.research-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.research-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 35, 82, 0.62));
}

.research-card span {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 1;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.research-card:hover img {
  transform: scale(1.06);
}

.newsletter-section {
  padding-top: 40px;
}

.newsletter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 42px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(0, 63, 151, 0.94), rgba(20, 164, 211, 0.9)),
    #003f97;
  color: #fff;
  box-shadow: var(--shadow);
}

.newsletter-card h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
}

.newsletter-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.newsletter-form {
  flex: 0 1 420px;
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: #fff;
}

.newsletter-form input {
  min-width: 0;
  flex: 1;
  padding: 0 18px;
  border: 0;
  outline: 0;
}

.site-footer {
  color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(90deg, rgba(0, 25, 70, 0.94), rgba(0, 42, 98, 0.94)),
    url("../assets/img/footer-bg.jpg") center / cover;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 42px;
  padding: 58px 0 34px;
}

.footer-brand img {
  width: 160px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.footer-brand p {
  max-width: 330px;
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 17px;
}

.site-footer a,
.site-footer p {
  display: block;
  margin: 0 0 11px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

.footer-bottom span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-bottom img {
  width: 18px;
}

.floating-ai {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0c57bd, #18a8d8);
  box-shadow: 0 16px 36px rgba(0, 53, 127, 0.24);
  font-weight: 800;
  cursor: pointer;
}

.floating-ai img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 50;
  max-width: min(420px, calc(100% - 32px));
  padding: 13px 18px;
  border-radius: 999px;
  background: rgba(14, 31, 58, 0.92);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 980px) {
  .top-strip {
    display: none;
  }

  .nav-bar {
    height: 68px;
    justify-content: space-between;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    left: 20px;
    right: 20px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-item {
    padding: 0;
  }

  .nav-item > a {
    display: block;
    padding: 14px 10px;
  }

  .mega-panel {
    position: static;
    width: auto;
    transform: none;
    display: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border: 0;
    background: var(--blue-soft);
  }

  .nav-item:hover .mega-panel {
    display: block;
    transform: none;
  }

  .nav-actions {
    display: none;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid,
  .research-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .newsletter-card {
    align-items: stretch;
    flex-direction: column;
  }

  .newsletter-form {
    flex: auto;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .brand img {
    width: 132px;
  }

  .hero {
    min-height: 560px;
  }

  .hero__content {
    padding: 60px 0 96px;
  }

  .search-card,
  .newsletter-form {
    border-radius: 20px;
    flex-direction: column;
  }

  .search-card input,
  .newsletter-form input {
    min-height: 48px;
  }

  .category-grid,
  .feature-grid,
  .product-grid,
  .research-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-section {
    margin-top: -38px;
  }

  section {
    padding: 58px 0;
  }

  .section-title--row,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-card h3 {
    min-height: auto;
  }

  .newsletter-card {
    padding: 28px;
  }

  .floating-ai span {
    display: none;
  }

  .floating-ai {
    padding: 8px;
  }
}

/* Homepage calibration: match the source site's desktop proportions and card rhythm. */
@media (min-width: 981px) {
  .container {
    width: min(1400px, calc(100% - 40px));
  }

  .site-header {
    position: sticky;
    top: 0;
    height: 54px;
    color: #fff;
    background:
      linear-gradient(90deg, rgba(52, 120, 176, 0.72), rgba(80, 106, 176, 0.66)),
      url("../assets/source/50-bg-header.jpg") center / cover;
    box-shadow: none;
    backdrop-filter: blur(8px);
  }

  .top-strip {
    display: none;
  }

  .nav-bar {
    height: 54px;
    gap: 42px;
    padding: 0 40px;
  }

  .brand img {
    width: 140px;
    filter: brightness(0) invert(1);
  }

  .main-nav {
    justify-content: center;
    gap: 36px;
    color: rgba(255, 255, 255, 0.96);
    font-size: 14px;
    font-weight: 500;
  }

  .nav-item {
    padding: 18px 0;
  }

  .nav-item:hover > a {
    color: #fff;
  }

  .nav-actions {
    gap: 2px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
  }

  .icon-button:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
  }

  .icon-button img {
    width: 20px;
  }

  .hero {
    height: 656px;
    min-height: 0;
    display: flex;
    align-items: center;
    background: #071230;
  }

  .hero__bg {
    background-position: center;
    opacity: 1;
  }

  .hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    text-align: center;
    transform: translateY(-42px);
  }

  .hero .eyebrow,
  .hero__lead,
  .hero__quick-links {
    display: none;
  }

  .hero h1 {
    width: auto;
    margin: 0;
    color: #fff;
    font-size: 39px;
    line-height: 1.5;
    letter-spacing: 0;
    text-shadow: 0 1px 7px rgba(0, 20, 54, 0.24);
  }

  .search-card {
    width: 430px;
    height: 54px;
    margin-top: 36px;
    padding: 0;
    border-radius: 999px;
    box-shadow: 0 7px 24px rgba(0, 18, 58, 0.16);
  }

  .search-card input {
    padding: 0 18px;
    font-size: 14px;
  }

  .search-card button {
    position: relative;
    width: 56px;
    flex: 0 0 56px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    background: #57ace6;
    box-shadow: none;
  }

  .search-card button::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 14px;
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 50%;
  }

  .search-card button::after {
    content: "";
    position: absolute;
    left: 36px;
    top: 33px;
    width: 8px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transform: rotate(45deg);
  }

  .category-section {
    position: relative;
    z-index: 3;
    margin: 0;
    padding: 50px 0 34px;
    background: #eaf4f7;
  }

  .category-section .container {
    padding: 0 20px;
  }

  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 30px;
  }

  .category-card {
    position: relative;
    min-height: 226px;
    display: block;
    padding: 25px 20px 20px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(26, 71, 110, 0.08);
    text-align: left;
  }

  .category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(26, 71, 110, 0.13);
  }

  .category-card img {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 62px;
    height: 62px;
    object-fit: contain;
  }

  .category-card strong {
    display: block;
    margin-bottom: 17px;
    color: #3479bd;
    font-size: 18px;
    line-height: 1.25;
  }

  .category-card span {
    display: block;
    color: #707070;
    font-size: 14px;
    line-height: 1.48;
  }

  .category-card::after {
    content: "查看更多";
    position: absolute;
    left: 20px;
    bottom: 20px;
    min-width: 80px;
    padding: 6px 14px;
    border-radius: 999px;
    color: #fff;
    background: #397fc4;
    font-size: 12px;
    line-height: 1;
    text-align: center;
  }
}

@media (min-width: 981px) and (max-height: 850px) {
  .hero {
    height: 590px;
  }

  .category-section {
    padding-top: 38px;
  }
}

@media (min-width: 981px) and (max-width: 1280px) {
  .main-nav {
    gap: 20px;
  }

  .category-grid {
    gap: 16px;
  }

  .category-card {
    padding-left: 16px;
  }

  .category-card::after {
    left: 16px;
  }
}

@media (min-width: 981px) {
  .floating-ai {
    right: 24px;
    bottom: 64px;
    width: 64px;
    height: 64px;
    display: block;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 22px rgba(42, 132, 223, 0.34);
  }

  .floating-ai img {
    width: 64px;
    height: 64px;
  }

  .floating-ai span {
    display: none;
  }

  .floating-ai::before {
    content: "HI！我是 LUMI，可以帮您解决产品和实验问题哦～";
    position: absolute;
    right: 0;
    bottom: 78px;
    width: 245px;
    padding: 16px 18px;
    border-radius: 16px;
    color: #536172;
    background: #fff;
    box-shadow: 0 7px 24px rgba(22, 60, 94, 0.13);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    text-align: left;
    box-sizing: border-box;
  }

  .floating-ai::after {
    content: "在线咨询";
    position: absolute;
    right: -2px;
    top: 77px;
    width: 118px;
    padding: 11px 12px;
    border-radius: 4px 4px 0 0;
    color: #fff;
    background: #4a8df6;
    box-shadow: 0 7px 22px rgba(42, 101, 196, 0.22);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    box-sizing: border-box;
  }
}
