/* Xiheng Technology - Global Corporate Website */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #eaf1fb;
  --text: #101820;
  --muted: #4d5b6a;
  --brand: #0f62fe;
  --brand-dark: #0043ce;
  --line: #dbe4f3;
  --success: #24a148;
  --warning: #f1c21b;
  --danger: #da1e28;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow: 0 8px 24px rgba(16, 24, 32, 0.08);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 5%, rgba(15, 98, 254, 0.12), transparent 30%),
    radial-gradient(circle at 90% 0%, rgba(0, 67, 206, 0.1), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 55%, #eef3fa 100%);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 98, 254, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 98, 254, 0.03) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 70% 18%, black 18%, transparent 72%);
  z-index: -1;
}

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

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.container {
  width: min(100% - 2.2rem, var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 0.75rem;
  top: 0.75rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background: var(--brand-dark);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 8px 20px rgba(16, 24, 32, 0.1);
  background: rgba(255, 255, 255, 0.98);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.brand-logo {
  width: 44px;
  height: 44px;
}

.nav-toggle {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  display: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.site-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.96rem;
  text-decoration: none;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  color: var(--brand-dark);
  border-color: var(--brand-dark);
}

.hero {
  padding: 4rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: stretch;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(15, 98, 254, 0.2), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 0.8rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.8rem, 2.6vw, 3rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.08rem;
  color: #223140;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--brand-dark);
  text-decoration: none;
}

.btn-secondary {
  background: #fff;
  color: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: #eef4ff;
  text-decoration: none;
}

.section {
  padding: 2.8rem 0;
}

.section-header {
  margin-bottom: 1.2rem;
}

.grid-3,
.grid-4,
.grid-2 {
  display: grid;
  gap: 1rem;
}

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

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 6px 16px rgba(16, 24, 32, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(16, 24, 32, 0.12);
  border-color: #b8cff7;
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.08rem;
}

.icon {
  width: 38px;
  height: 38px;
  margin-bottom: 0.7rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.stat {
  background: linear-gradient(160deg, #edf4ff 0%, #fff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.1;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pill-list li {
  background: #e9f1ff;
  border: 1px solid #c8dcff;
  color: #0f2a5a;
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  font-size: 0.88rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #c4d7f7;
}

.timeline li {
  padding-left: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

th,
td {
  text-align: left;
  padding: 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.9rem;
  color: #1a355a;
  background: #ecf3ff;
}

.legal {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

.legal h2 {
  margin-top: 1.6rem;
}

.legal h3 {
  margin-top: 1.1rem;
  font-size: 1.06rem;
}

.legal ul {
  padding-left: 1.2rem;
}

.callout {
  border-left: 4px solid var(--brand);
  background: #edf4ff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.8rem 1rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  background: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 0;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 0.78fr 0.22fr;
  gap: 1rem;
}

.article-meta {
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.article-body p {
  margin: 0 0 1rem;
}

.article-body h2 {
  margin-top: 1.4rem;
}

.aside-links {
  display: grid;
  gap: 0.65rem;
}

.aside-links a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  padding: 0.75rem;
}

.aside-links a:hover,
.aside-links a:focus {
  border-color: #8ab6ff;
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: calc(var(--reveal-index, 0) * 70ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1rem;
}

.feature-panel {
  background: linear-gradient(150deg, #0f62fe 0%, #0043ce 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.feature-panel h3 {
  color: #fff;
}

.feature-panel a {
  color: #cfe0ff;
}

.mini-list {
  display: grid;
  gap: 0.75rem;
}

.mini-list a {
  display: block;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-md);
  padding: 0.9rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.mini-list a:hover,
.mini-list a:focus {
  border-color: #8ab6ff;
  transform: translateX(3px);
  text-decoration: none;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-4,
  .grid-3,
  .stats,
  .spotlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
  }

  .site-nav.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    display: block;
    padding: 0.7rem 1rem 1rem;
  }

  .site-nav li + li {
    margin-top: 0.7rem;
  }

  .hero-grid,
  .grid-4,
  .grid-3,
  .grid-2,
  .stats,
  .spotlight-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.6rem;
  }
}
