/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-decoration: none !important;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent-orange);
  color: var(--text-primary);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(232, 119, 34, 0.28);
}

.btn--primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 8px 20px rgba(232, 119, 34, 0.34);
}

.btn--secondary {
  background: transparent;
  border-color: var(--brand-secondary);
  color: var(--brand-primary);
}

.btn--secondary:hover {
  background: rgba(44, 110, 122, 0.08);
}

.btn--ghost {
  background: transparent;
  color: var(--brand-secondary);
  height: auto;
  padding: 0;
  border: 0;
}

.btn--ghost::after {
  content: "→";
  transition: transform 0.2s ease;
}

.btn--ghost:hover::after {
  transform: translateX(3px);
}

.btn--on-dark.btn--secondary {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.btn--on-dark.btn--ghost {
  color: rgba(255, 255, 255, 0.9);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(247, 245, 240, 0.88);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--border-default);
  box-shadow: 0 6px 20px rgba(26, 78, 92, 0.06);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-primary);
  text-decoration: none !important;
  flex-shrink: 0;
}

.logo__img {
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.logo__img--header {
  width: 140px;
  height: 51px;
}

.logo__img--footer {
  width: 154px;
  height: 56px;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
  gap: 2px;
  width: max-content;
}

.logo__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.logo__en {
  /* 以汉字行宽为准，英文两端对齐拉齐到同宽 */
  display: block;
  box-sizing: border-box;
  width: 0;
  min-width: 100%;
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  text-align: justify;
  text-align-last: justify;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav__link {
  position: relative;
  padding: 10px 11px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  border-radius: 6px;
  transition:
    color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-orange), var(--brand-secondary));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--brand-primary);
  background: rgba(26, 78, 92, 0.06);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__link:active {
  transform: translateY(1px);
}

.nav__item {
  position: relative;
}

.nav__item:hover .mega,
.nav__item:focus-within .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 8px);
  width: 720px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.mega__label {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

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

.mega__link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  text-decoration: none !important;
  background: var(--bg-light);
}

.mega__link:hover {
  background: rgba(232, 119, 34, 0.1);
  color: var(--brand-primary);
}

.mega__more {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-default);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mega__chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-cool);
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 4px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--brand-primary);
}

/* ========== Cards ========== */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 15px 13px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-orange), var(--accent-teal));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(26, 78, 92, 0.12);
  border-color: rgba(42, 158, 160, 0.45);
}

.card:hover::before {
  opacity: 1;
}

.card__num {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.card__title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

.card__desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.card__badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(232, 119, 34, 0.12);
  color: var(--accent-orange-deep);
  font-size: 11px;
  font-weight: 700;
  min-height: 1.4em;
}

.card--solution {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
}

.card__badge--ghost {
  visibility: hidden;
  background: transparent;
  color: transparent;
  pointer-events: none;
}

.card__cta {
  margin-top: auto;
  align-self: flex-start;
}

.card--solution .card__desc {
  flex: 1;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: stretch;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: stretch;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: stretch;
}

/* ========== Footer ========== */
.site-footer {
  background: var(--bg-deep);
  color: rgba(255, 255, 255, 0.82);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 0.95fr) 1.15fr 120px;
  gap: 24px 20px;
  align-items: start;
  margin-bottom: 40px;
}

.footer-brand .logo {
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(197, 212, 216, 0.72);
  border-radius: var(--radius-md);
  background: rgba(248, 250, 250, 0.96);
  box-shadow: 0 10px 24px rgba(4, 28, 34, 0.22);
}

.footer-brand__tagline {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accent-orange);
}

.footer-brand__desc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  max-width: 280px;
}

.footer-col__title {
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
}

.footer-col a {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none !important;
}

.footer-col a:hover {
  color: var(--accent-gold);
}

.footer-col__addr {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
}

.footer-wechat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  justify-self: end;
  width: 112px;
}

.footer-wechat .footer-col__title {
  margin-bottom: 0;
  width: 100%;
  text-align: center;
}

.footer-wechat img {
  display: block;
  width: 112px;
  height: 112px;
  padding: 7px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.footer-wechat__meta {
  width: 100%;
  text-align: center;
}

.footer-wechat__meta span {
  display: block;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.contact-wechat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 4px;
}

.contact-wechat img {
  display: block;
  width: 128px;
  height: 128px;
  padding: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.contact-wechat p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.65);
}

/* ========== Mobile dock ========== */
.mobile-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border-default);
  backdrop-filter: blur(10px);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mobile-dock a,
.mobile-dock button {
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--bg-cool);
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  display: grid;
  place-items: center;
}

.mobile-dock .is-primary {
  background: var(--accent-orange);
  color: var(--text-primary);
}

/* ========== Modal ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 56, 64, 0.55);
}

.modal__panel {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal__title {
  font-size: 22px;
  color: var(--brand-primary);
  margin-bottom: 6px;
}

.modal__desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--bg-cool);
  cursor: pointer;
  color: var(--text-secondary);
}

.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--bg-warm);
  color: var(--text-primary);
}

.form-field textarea {
  height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

.form-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.form-check input {
  margin-top: 3px;
}

.form-msg {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(44, 110, 122, 0.1);
  color: var(--brand-primary);
  font-size: 13px;
}

.form-msg.is-error {
  background: rgba(192, 57, 43, 0.08);
  color: var(--semantic-error);
}

.btn.is-loading {
  opacity: 0.72;
  cursor: wait;
  pointer-events: none;
}

.demo-form__submit {
  width: 100%;
}

.captcha-dialog {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.captcha-dialog[hidden] {
  display: none;
}

.captcha-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 56, 64, 0.68);
  backdrop-filter: blur(2px);
}

.captcha-dialog__panel {
  position: relative;
  width: min(100%, 390px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.28);
}

.captcha-dialog__title {
  margin: 0 42px 6px 0;
  color: var(--brand-primary);
  font-size: 20px;
}

.captcha-dialog__desc {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.appointment-captcha {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--bg-cool);
}

.appointment-captcha[hidden] {
  display: none;
}

.appointment-captcha__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.appointment-captcha__refresh {
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: var(--brand-primary);
  font-size: 12px;
  cursor: pointer;
}

.appointment-captcha__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 7px;
  background: #dfe8e7;
  user-select: none;
}

.appointment-captcha__background,
.appointment-captcha__piece {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.appointment-captcha__background {
  width: 100%;
}

.appointment-captcha__piece {
  z-index: 2;
  width: 15.162%;
  will-change: transform;
}

.appointment-captcha__bar {
  position: relative;
  height: 44px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: 7px;
  background: var(--white);
  color: var(--text-secondary);
  user-select: none;
}

.appointment-captcha__progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 22px;
  background: rgba(44, 110, 122, 0.12);
  pointer-events: none;
}

.appointment-captcha__hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: 48px;
  font-size: 12px;
  pointer-events: none;
}

.appointment-captcha__handle {
  position: relative;
  z-index: 3;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--border-default);
  background: var(--white);
  color: var(--brand-primary);
  font-size: 27px;
  line-height: 1;
  place-items: center;
  cursor: grab;
  touch-action: none;
  will-change: transform;
}

.appointment-captcha__handle:active {
  cursor: grabbing;
}

.appointment-captcha__handle:disabled {
  color: #9baaaa;
  cursor: wait;
}

.appointment-captcha[data-state="success"] .appointment-captcha__bar {
  border-color: #4b9a76;
  color: #2e7658;
}

.appointment-captcha[data-state="success"] .appointment-captcha__progress,
.appointment-captcha[data-state="success"] .appointment-captcha__handle {
  background: #e1f1e9;
}

.appointment-captcha[data-state="error"] .appointment-captcha__bar {
  border-color: rgba(192, 57, 43, 0.55);
  color: var(--semantic-error);
}

.appointment-captcha[data-state="loading"] .appointment-captcha__stage,
.appointment-captcha[data-state="checking"] .appointment-captcha__stage {
  opacity: 0.72;
}

.site-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 220;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border-radius: 10px;
  background: #123840;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 10px 28px rgba(18, 56, 64, 0.22);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.site-toast.is-error {
  background: #8a2f28;
}

/* ========== Mobile nav drawer ========== */
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 95;
  background: var(--bg-warm);
  padding: 20px;
  overflow: auto;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-default);
  color: var(--brand-primary);
  font-size: 16px;
  text-decoration: none !important;
}

@media (max-width: 1100px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

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

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

  .footer-wechat {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .captcha-dialog {
    align-items: flex-end;
    padding: 16px;
  }

  .captcha-dialog__panel {
    width: 100%;
    padding: 24px 18px 18px;
    border-radius: 18px 18px 14px 14px;
  }

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

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

  .footer-wechat {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .footer-wechat .footer-col__title {
    display: none;
  }

  .mobile-dock {
    display: grid;
  }

  body {
    padding-bottom: 72px;
  }

  .header-actions .btn {
    height: 40px;
    padding: 0 14px;
    font-size: 13px;
  }
}
