/* 1. CSS variables */
:root {
  --primary-blue: #0877e7;
  --primary-blue-dark: #075fb7;
  --primary-blue-deep: #083f73;
  --primary-blue-light: #eaf4ff;
  --text-main: #1f2937;
  --text-secondary: #667085;
  --border: #e5e7eb;
  --background: #ffffff;
  --background-soft: #f6f9fc;
  --shadow-card: 0 6px 24px rgba(29, 67, 104, 0.07);
  --container: 1240px;
  --header-height: 82px;
}

/* 2. Reset / base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-top: var(--header-height);
  color: var(--text-main);
  background: var(--background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin-top: 0;
}

:focus-visible {
  outline: 3px solid rgba(8, 119, 231, 0.45);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 16px;
  color: #fff;
  background: var(--primary-blue-dark);
  border-radius: 6px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* 3. Layout */
.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 88px 0 96px;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

/* 4. Header */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: 0 2px 10px rgba(16, 42, 67, 0.04);
}

.header-main {
  display: grid;
  grid-template-columns: minmax(218px, 1fr) auto minmax(245px, 1.15fr);
  align-items: center;
  column-gap: 30px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-width: 0;
}

.brand-mark {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  overflow: hidden;
}

.brand-mark img {
  max-width: none;
  width: 150px;
  height: 150px;
  transform: translate(-49px, -37px);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  margin-left: 8px;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 7px;
  color: #5b6676;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* 5. Navigation */
.primary-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 30px;
  white-space: nowrap;
}

.primary-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #364152;
  font-size: 15px;
  font-weight: 500;
  transition: color 180ms ease;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  content: "";
  background: var(--primary-blue);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a.is-current {
  color: var(--primary-blue-dark);
}

.primary-nav a.is-current::after,
.primary-nav a:hover::after {
  transform: scaleX(1);
}

/* 6. Search */
.site-search {
  display: flex;
  justify-self: end;
  width: min(100%, 302px);
  height: 42px;
  overflow: hidden;
  background: #f7f9fb;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.site-search:focus-within {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(8, 119, 231, 0.12);
}

.site-search input {
  min-width: 0;
  flex: 1;
  padding: 0 6px 0 14px;
  color: var(--text-main);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.site-search input::placeholder {
  color: #8a94a3;
}

.site-search button {
  display: grid;
  flex: 0 0 43px;
  place-items: center;
  padding: 0;
  color: var(--primary-blue-dark);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.site-search button:hover {
  background: var(--primary-blue-light);
}

.site-search svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

/* 7. Hero carousel */
.hero-carousel {
  position: relative;
  height: clamp(460px, 34vw, 650px);
  min-height: 460px;
  overflow: hidden;
  background: #dce8f4;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-slide[data-slide="0"] > img {
  object-position: 54% center;
}

.hero-slide[data-slide="2"] > img {
  object-position: 58% center;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 31, 55, 0.48) 0%, rgba(7, 44, 78, 0.2) 34%, rgba(7, 44, 78, 0) 62%);
}

.hero-content {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  z-index: 2;
  color: #fff;
  transform: translateY(-50%);
  text-shadow: 0 2px 16px rgba(0, 27, 52, 0.22);
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(42px, 3vw, 52px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.015em;
}

.hero-content p {
  margin-bottom: 0;
  font-size: clamp(18px, 1.25vw, 20px);
  letter-spacing: 0.03em;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 58px;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(8, 35, 60, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 180ms ease;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  background: rgba(8, 68, 118, 0.65);
}

.carousel-arrow svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.carousel-prev {
  left: max(20px, calc((100vw - var(--container)) / 2 - 66px));
}

.carousel-next {
  right: max(20px, calc((100vw - var(--container)) / 2 - 66px));
}

.carousel-dots {
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.carousel-dots button {
  width: 30px;
  height: 14px;
  padding: 5px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.carousel-dots button::after {
  display: block;
  width: 100%;
  height: 3px;
  content: "";
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  transition: background 180ms ease, transform 180ms ease;
}

.carousel-dots button.is-active::after {
  background: #fff;
  transform: scaleY(1.45);
}

/* 8. Section common styles */
.section-heading {
  margin-bottom: 42px;
  text-align: center;
}

.section-heading span {
  display: block;
  margin-bottom: 6px;
  color: var(--primary-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.section-heading h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 0;
  padding-bottom: 15px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.section-heading h2::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 34px;
  height: 3px;
  content: "";
  background: var(--primary-blue);
  border-radius: 999px;
  transform: translateX(-50%);
}

.case-card,
.news-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.case-card:hover,
.news-card:hover {
  border-color: #d2e2f2;
  box-shadow: 0 10px 28px rgba(29, 67, 104, 0.11);
}

.card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e7edf3;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-image-huajing img {
  object-position: 50% 43%;
}

.card-body {
  padding: 22px 22px 24px;
}

.card-body h3 {
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
}

.card-body p {
  color: var(--text-secondary);
}

/* 9. Business */
.business-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.business-card {
  min-height: 250px;
  padding: 32px 24px 28px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(29, 67, 104, 0.045);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.business-card:hover {
  border-color: #cfe3f7;
  box-shadow: 0 9px 24px rgba(29, 67, 104, 0.09);
}

.business-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin: 0 auto 22px;
  color: var(--primary-blue);
  background: var(--primary-blue-light);
  border-radius: 10px;
}

.business-icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.business-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
}

.business-card p {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

/* 10. Cases */
.cases-section {
  background: var(--background-soft);
}

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

.case-card .card-body p {
  min-height: 52px;
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.75;
}

.case-card time {
  color: #7b8491;
  font-size: 13px;
}

/* 11. News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.news-card .card-body time {
  display: block;
  margin-bottom: 10px;
  color: var(--primary-blue-dark);
  font-size: 13px;
  font-weight: 600;
}

.news-card .card-body h3 {
  display: -webkit-box;
  min-height: 57px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-card .card-body p {
  display: -webkit-box;
  min-height: 76px;
  margin-bottom: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* 12. About */
.about-section {
  padding-top: 92px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 58px;
}

.about-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(29, 67, 104, 0.12);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-content > p {
  margin-bottom: 18px;
  color: #4e5a6a;
  font-size: 15px;
  line-height: 2;
  text-align: justify;
}

.company-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 30px 0 0;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}

.company-stats div {
  position: relative;
  text-align: center;
}

.company-stats div + div::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 1px;
  content: "";
  background: var(--border);
}

.company-stats dt {
  color: var(--primary-blue-dark);
  font-size: 27px;
  font-weight: 650;
  line-height: 1.25;
}

.company-stats dd {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* 13. Team */
.team-section {
  background: var(--background-soft);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.member-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  cursor: default;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  transition: opacity 500ms ease, visibility 0s linear;
}

.member-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8edf2;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.member-photo-default img {
  object-position: center;
}

.member-copy {
  min-height: 104px;
  padding: 22px 24px 24px;
  text-align: center;
}

.member-copy h3 {
  margin-bottom: 7px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.member-copy p {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.member-card-transient::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: #8f0713;
  opacity: 0;
  transition: opacity 260ms ease-out;
}

.member-card-transient.is-covered::after {
  opacity: 1;
}

.member-card-transient.is-covered {
  border-color: #8f0713;
  box-shadow: none;
  transform: none;
}

.member-card-transient.is-removed {
  opacity: 0;
  visibility: hidden;
  transform: none;
  transition: opacity 500ms ease, visibility 0s linear 500ms;
}

/* 14. Footer */
.site-footer {
  color: rgba(255, 255, 255, 0.8);
  background: #0b2e4f;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 128px;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand strong {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.footer-brand span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.footer-brand .footer-disclaimer {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0;
  white-space: nowrap;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 28px;
  font-size: 14px;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
}

.footer-bottom {
  padding: 18px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
}

/* 15. Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
