:root {
  --text: #101519;
  --muted: #667078;
  --line: rgba(16, 21, 25, 0.12);
  --surface: #f3f6f5;
  --white: #ffffff;
  --green: #176c43;
  --mint: #cce6d6;
  --gold: #c79a4a;
  --blue: #496a7a;
  --ink: #080d10;
  --shadow: 0 28px 90px rgba(7, 13, 16, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

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

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

.detail-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 40px;
  color: var(--white);
  background: rgba(8, 13, 16, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.detail-header.is-scrolled {
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line);
}

.detail-brand {
  display: inline-flex;
  align-items: center;
  min-width: 166px;
  height: 40px;
}

.detail-logo {
  display: block;
  width: 146px;
  height: auto;
}

.detail-logo-dark {
  display: none;
}

.detail-header.is-scrolled .detail-logo-dark {
  display: block;
}

.detail-header.is-scrolled .detail-logo-light {
  display: none;
}

.detail-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
}

.lab-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: 124px 8vw 92px;
  color: var(--white);
  overflow: hidden;
}

.lab-hero-media,
.lab-hero-shade {
  position: absolute;
  inset: 0;
}

.lab-hero-media {
  background-image: url("assets/research-lab-page/research-lab-hero-clean.jpg");
  background-size: cover;
  background-position: center right;
  transform: scale(1.018);
}

.lab-hero-shade {
  background:
    linear-gradient(180deg, rgba(3, 8, 10, 0.16), rgba(3, 8, 10, 0.82)),
    linear-gradient(90deg, rgba(3, 8, 10, 0.78), rgba(3, 8, 10, 0.18) 58%, rgba(3, 8, 10, 0.52));
}

.lab-hero-content {
  position: relative;
  z-index: 2;
  width: min(980px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.lab-hero h1 {
  width: min(920px, 100%);
  margin: 0;
  font-size: clamp(42px, 7.2vw, 88px);
  line-height: 1.04;
}

.lab-hero-content p:last-child {
  width: min(760px, 100%);
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.hero-metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(720px, 100%);
  margin-top: 52px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.hero-metrics article {
  min-height: 112px;
  padding: 22px;
  background: rgba(8, 13, 16, 0.42);
}

.hero-metrics strong {
  display: block;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
}

.hero-metrics span {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.topic-bar {
  position: sticky;
  top: 64px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 1px;
  padding: 0 8vw;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topic-bar a {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 62px;
  padding: 8px 6px;
  color: rgba(16, 21, 25, 0.62);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
  background: rgba(16, 21, 25, 0.035);
  transition: background 0.2s ease, color 0.2s ease;
}

.topic-bar a span {
  color: rgba(16, 21, 25, 0.36);
  font-size: 11px;
  font-weight: 900;
}

.topic-bar a.is-active {
  color: var(--white);
  background: var(--green);
}

.topic-bar a.is-active span {
  color: rgba(255, 255, 255, 0.7);
}

.topic-bar a:hover {
  color: var(--text);
  background: rgba(23, 108, 67, 0.1);
}

.topic-bar a.is-active:hover {
  color: var(--white);
  background: var(--green);
}

.section {
  padding: 112px 8vw;
}

.section.soft {
  background: var(--surface);
}

.section.dark {
  color: var(--white);
  background:
    linear-gradient(135deg, #081014, #15251f 54%, #0c1215);
}

.section-heading {
  max-width: 980px;
  margin-bottom: 48px;
}

.section-heading h2,
.platform-copy h2 {
  margin: 0;
  font-size: clamp(32px, 4.8vw, 62px);
  line-height: 1.12;
}

.section-heading p,
.platform-copy p {
  max-width: 790px;
  color: var(--muted);
  line-height: 1.85;
  font-size: 17px;
}

.dark .section-heading p {
  color: rgba(255, 255, 255, 0.72);
}

.position-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: start;
}

.position-flow {
  display: grid;
  gap: 14px;
}

.position-flow article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 36px rgba(12, 20, 24, 0.06);
}

.position-flow span {
  grid-row: span 2;
  color: var(--green);
  font-weight: 900;
}

.position-flow strong {
  font-size: 21px;
}

.position-flow p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.lab-domain-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.domain-card {
  min-height: 320px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.08);
}

.domain-card span {
  color: var(--mint);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.domain-card h3,
.room-grid h3,
.deliver-grid h3 {
  margin: 18px 0 14px;
  font-size: 24px;
  line-height: 1.3;
}

.domain-card p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.room-grid article {
  position: relative;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
  background-image: var(--room-image);
  background-size: var(--room-size, 230%);
  background-position: var(--room-position, center);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 48px rgba(12, 20, 24, 0.12);
  outline: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.room-grid article::before,
.room-grid article::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: opacity 0.28s ease;
}

.room-grid article::before {
  background:
    linear-gradient(180deg, rgba(5, 11, 14, 0.06), rgba(5, 11, 14, 0.72)),
    linear-gradient(90deg, rgba(5, 11, 14, 0.62), rgba(5, 11, 14, 0.18));
}

.room-grid article::after {
  opacity: 0;
  background: linear-gradient(180deg, rgba(10, 24, 20, 0.2), rgba(10, 24, 20, 0.88));
}

.room-grid article:nth-child(1) {
  --room-image: url("assets/research-lab-page/research-lab-matrix-a.png");
  --room-size: 245%;
  --room-position: 12% 15%;
}

.room-grid article:nth-child(2) {
  --room-image: url("assets/research-lab-page/research-lab-matrix-a.png");
  --room-size: 245%;
  --room-position: 13% 61%;
}

.room-grid article:nth-child(3) {
  --room-image: url("assets/research-lab-page/research-lab-matrix-a.png");
  --room-size: 245%;
  --room-position: 66% 15%;
}

.room-grid article:nth-child(4) {
  --room-image: url("assets/research-lab-page/research-lab-matrix-a.png");
  --room-size: 245%;
  --room-position: 66% 61%;
}

.room-grid article:nth-child(5) {
  --room-image: url("assets/research-lab-page/research-lab-matrix-b.png");
  --room-size: 245%;
  --room-position: 12% 15%;
}

.room-grid article:nth-child(6) {
  --room-image: url("assets/research-lab-page/research-lab-matrix-b.png");
  --room-size: 245%;
  --room-position: 12% 62%;
}

.room-grid article:nth-child(7) {
  --room-image: url("assets/research-lab-page/research-lab-matrix-b.png");
  --room-size: 245%;
  --room-position: 66% 15%;
}

.room-grid article:nth-child(8) {
  --room-image: url("assets/research-lab-page/research-lab-matrix-b.png");
  --room-size: 245%;
  --room-position: 66% 62%;
}

.room-grid article:hover,
.room-grid article:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 26px 70px rgba(8, 16, 18, 0.24);
}

.room-grid article:hover::after,
.room-grid article:focus-visible::after {
  opacity: 1;
}

.room-grid span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  background: rgba(23, 108, 67, 0.94);
  font-weight: 850;
}

.room-grid h3,
.room-grid p,
.room-grid span {
  position: relative;
  z-index: 1;
}

.room-grid h3 {
  max-width: 11em;
  color: var(--white);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.42);
}

.room-grid p,
.deliver-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.room-grid p {
  max-height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  transform: translateY(12px);
  transition: max-height 0.28s ease, margin 0.28s ease, opacity 0.28s ease, transform 0.28s ease;
}

.room-grid article:hover p,
.room-grid article:focus-visible p {
  max-height: 160px;
  margin-top: 6px;
  opacity: 1;
  transform: translateY(0);
}

.platform-section {
  background: var(--white);
}

.platform-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 54px;
  align-items: center;
}

.platform-media {
  min-height: 620px;
  background:
    linear-gradient(180deg, rgba(6, 11, 14, 0), rgba(6, 11, 14, 0.18)),
    url("assets/brochure/page-44-image-0.jpg") center / cover;
}

.platform-copy {
  max-width: 760px;
}

.platform-list {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.platform-list article {
  padding: 20px 22px;
  border-left: 4px solid var(--green);
  background: var(--surface);
}

.platform-list strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.platform-list span {
  color: var(--muted);
  line-height: 1.7;
}

.deliver-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.deliver-grid article {
  min-height: 270px;
  padding: 30px;
  background: var(--white);
}

.next-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 70px 8vw;
  color: var(--white);
  background: #0b1014;
}

.next-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
}

.next-section p {
  color: rgba(255, 255, 255, 0.68);
}

.next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 146px;
  height: 48px;
  padding: 0 18px;
  color: var(--white);
  background: var(--green);
  border-radius: 4px;
  font-weight: 800;
}

.button.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

@media (max-width: 1180px) {
  .lab-domain-grid,
  .room-grid,
  .deliver-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .detail-header {
    padding: 0 22px;
  }

  .detail-nav {
    gap: 16px;
  }

  .topic-bar {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .position-grid,
  .platform-grid,
  .next-section {
    grid-template-columns: 1fr;
  }

  .platform-media {
    min-height: 420px;
  }
}

@media (max-width: 680px) {
  .detail-logo {
    width: 122px;
  }

  .detail-brand {
    min-width: 138px;
  }

  .detail-nav {
    gap: 12px;
    font-size: 13px;
  }

  .detail-nav a:nth-child(2) {
    display: none;
  }

  .lab-hero,
  .section,
  .next-section {
    padding-left: 22px;
    padding-right: 22px;
  }

  .lab-hero {
    min-height: 92vh;
    padding-top: 104px;
  }

  .hero-metrics,
  .lab-domain-grid,
  .room-grid,
  .deliver-grid {
    grid-template-columns: 1fr;
  }

  .topic-bar {
    padding-left: 22px;
    padding-right: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .room-grid article,
  .deliver-grid article {
    min-height: auto;
  }
}
