/* ShopXN shared brand shell — one navigation and type baseline for every page. */
:root {
  --sx-shell: 1280px;
  --sx-gutter: 40px;
  --sx-header-height: 80px;
  --sx-mobile-header-height: 72px;
  --sx-ink: #08172f;
  --sx-cobalt: #2855d9;
  --sx-orange: #f47721;
  --sx-orange-dark: #bd4700;
  --sx-line: #d9dde5;
  --sx-muted: #5f6b7d;
}

html { scroll-padding-top: var(--sx-header-height); }

body,
body.home-v2,
body.solution-v2 {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The new homepage and legacy pages share the exact same nav text metrics. */
.site-header .nav-link,
.site-header .nav-cta,
.site-header .language-link {
  line-height: 1;
}

.site-header .nav-cta {
  width: 179px;
  justify-content: center;
}

/* Shared marketing typography scale: consistent, without flattening page hierarchy. */
body.solution-v2 :is(.page-title, .hero-title, .about-hero h1, .contact-hero h1) {
  max-width: 18ch;
  font-size: clamp(46px, 4.3vw, 62px) !important;
  line-height: 1.08 !important;
  letter-spacing: -.035em !important;
}

body.solution-v2 :is(.section-title, .section-header h2) {
  font-size: clamp(36px, 3vw, 44px) !important;
  line-height: 1.14 !important;
  letter-spacing: -.025em !important;
}

body.solution-v2 :is(.page-subtitle, .hero-subtitle, .section-subtitle, .section-header > p) {
  font-size: 18px !important;
  line-height: 1.72 !important;
}

.sx-hero h1 {
  font-family: inherit !important;
  font-size: clamp(46px, 4.3vw, 62px) !important;
  line-height: 1.08 !important;
  letter-spacing: -.035em !important;
}

.sx-title {
  font-family: inherit !important;
  font-size: clamp(36px, 3vw, 44px) !important;
  line-height: 1.14 !important;
  letter-spacing: -.025em !important;
}

/* Legacy marketing-page header normalized to the new homepage geometry. */
.header {
  position: sticky !important;
  top: 0 !important;
  right: auto !important;
  left: auto !important;
  z-index: 1000 !important;
  width: 100%;
  height: var(--sx-header-height) !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, .97) !important;
  border-bottom: 1px solid rgba(8, 23, 47, .12) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.header .header-container {
  display: grid !important;
  grid-template-columns: 204px minmax(0, 1fr) auto;
  align-items: center;
  width: min(calc(100% - (var(--sx-gutter) * 2)), var(--sx-shell)) !important;
  max-width: var(--sx-shell) !important;
  height: var(--sx-header-height) !important;
  margin-inline: auto !important;
  padding: 0 !important;
}

.header .logo,
.header .logo:hover {
  display: inline-flex !important;
  align-items: center;
  width: 174px;
  min-height: 48px !important;
  color: var(--sx-ink) !important;
}

.header .site-logo-image {
  display: block;
  width: 174px !important;
  height: auto !important;
  max-width: none !important;
}

.header .nav { display: contents !important; }

.header .nav-links {
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  align-self: stretch;
  gap: 30px !important;
  height: var(--sx-header-height);
  margin: 0 !important;
  white-space: nowrap;
}

.header .nav-link {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  height: var(--sx-header-height) !important;
  min-height: var(--sx-header-height) !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #35435a !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
}

.header .nav-link::after {
  position: absolute;
  right: 0 !important;
  bottom: -1px !important;
  left: 0 !important;
  width: auto !important;
  height: 3px !important;
  border-radius: 0 !important;
  background: var(--sx-orange) !important;
  content: "";
  transform: scaleX(0) !important;
  transform-origin: center;
  transition: transform .2s ease;
}

.header .nav-link:hover,
.header .nav-link:focus-visible,
.header .nav-link[aria-current="page"] {
  color: var(--sx-ink) !important;
}

.header .nav-link:hover::after,
.header .nav-link:focus-visible::after,
.header .nav-link[aria-current="page"]::after {
  transform: scaleX(1) !important;
}

.header .nav-cta {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  height: var(--sx-header-height);
  margin: 0 !important;
}

.header .language-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #47556c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .11em;
}

.header .nav-cta > .btn-secondary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto !important;
  min-width: 0 !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  color: #fff !important;
  background: var(--sx-ink) !important;
  border: 1px solid var(--sx-ink) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 14px !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
}

.header .nav-cta > .btn-secondary::after {
  font-size: 15px;
  line-height: 1;
  content: "→";
}

.header .nav-cta > .btn-secondary:hover,
.header .nav-cta > .btn-secondary:focus-visible {
  color: #fff !important;
  background: var(--sx-cobalt) !important;
  border-color: var(--sx-cobalt) !important;
  transform: translateY(-1px);
}

.header .nav-cta > .btn-primary { display: none !important; }

.header .menu-toggle {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  color: var(--sx-ink) !important;
  background: #fff !important;
  border: 1px solid var(--sx-line) !important;
  border-radius: 0 !important;
  cursor: pointer;
}

.header .menu-toggle .menu-icon {
  width: 21px !important;
  height: 21px !important;
  margin: 0 auto;
  fill: currentColor;
}

.header a:focus-visible,
.header button:focus-visible,
.header .menu-toggle:focus-visible {
  outline: 3px solid #ffae72 !important;
  outline-offset: 4px;
}

@media (max-width: 1180px) and (min-width: 901px) {
  :root { --sx-gutter: 28px; }
  .header .header-container { grid-template-columns: 170px minmax(0, 1fr) auto; }
  .header .logo,
  .header .site-logo-image { width: 152px !important; }
  .header .nav-links { gap: 18px !important; }
  .header .nav-link { font-size: 14px !important; }
  .header .language-link { display: none; }
  .header .nav-cta { gap: 0 !important; }
  .header .nav-cta > .btn-secondary { padding-inline: 16px !important; font-size: 13px !important; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: var(--sx-mobile-header-height); }
  body,
  body.home-v2,
  body.solution-v2 { font-size: 17px; }

  body.solution-v2 :is(.page-title, .hero-title, .about-hero h1, .contact-hero h1) {
    max-width: none;
    font-size: clamp(38px, 11vw, 44px) !important;
    line-height: 1.1 !important;
  }

  body.solution-v2 :is(.section-title, .section-header h2) {
    font-size: clamp(30px, 8.5vw, 36px) !important;
  }

  body.solution-v2 :is(.page-subtitle, .hero-subtitle, .section-subtitle, .section-header > p) {
    font-size: 17px !important;
  }

  .sx-hero h1 {
    font-size: clamp(38px, 11vw, 44px) !important;
    line-height: 1.1 !important;
  }

  .sx-title { font-size: clamp(30px, 8.5vw, 36px) !important; }

  .header,
  .header .header-container { height: var(--sx-mobile-header-height) !important; }

  .header .header-container {
    grid-template-columns: 1fr auto;
    width: calc(100% - 40px) !important;
  }

  .header .logo,
  .header .site-logo-image { width: 142px !important; }

  .header .menu-toggle { display: inline-flex !important; }

  .header .nav,
  .header .nav.mobile-active,
  .header .nav.is-open {
    position: absolute !important;
    top: var(--sx-mobile-header-height) !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 1001;
    display: none !important;
    width: 100%;
    height: calc(100vh - var(--sx-mobile-header-height));
    padding: 0 20px 24px !important;
    overflow-y: auto;
    color: var(--sx-ink);
    background: #fff !important;
    border-bottom: 1px solid var(--sx-line);
    box-shadow: 0 18px 40px rgba(8, 23, 47, .15) !important;
  }

  .header .nav.mobile-active,
  .header .nav.is-open { display: block !important; }

  .header .nav-links,
  .header .nav.mobile-active .nav-links {
    display: block !important;
    height: auto;
    margin: 0 !important;
  }

  .header .nav-link,
  .header .nav.mobile-active .nav-link {
    display: flex !important;
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 4px !important;
    color: var(--sx-ink) !important;
    border-bottom: 1px solid var(--sx-line) !important;
    font-size: 17px !important;
  }

  .header .nav-link::after { display: none !important; }

  .header .nav-cta,
  .header .nav.mobile-active .nav-cta {
    display: flex !important;
    align-items: stretch !important;
    flex-direction: column;
    gap: 12px !important;
    height: auto;
    padding-top: 20px;
  }

  .header .language-link {
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--sx-line);
  }

  .header .nav-cta > .btn-secondary { width: 100% !important; min-height: 54px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .header *,
  .header *::before,
  .header *::after { transition-duration: .01ms !important; }
}
