/* VDA QMC China — redesigned homepage
   Brand: VDA green + white. Content preserved 1:1 from vdachina.com.cn */

:root {
  --green: #00a052;
  --green-deep: #008a45;
  --green-ink: #003d18;
  --green-soft: #e8f5ec;
  --ink: #142018;
  --muted: #5a675e;
  --line: #d5e0d8;
  --paper: #f3f7f4;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(0, 61, 24, 0.12);
  --radius: 2px;
  --shell: min(1200px, calc(100% - 3rem));
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Sora", "Noto Sans SC", sans-serif;
  --header-h: 88px;
  --util-h: 40px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(0, 150, 57, 0.08), transparent 55%),
    linear-gradient(180deg, #f7faf8 0%, var(--white) 35%, var(--paper) 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Body / interior text links — brand green, not browser blue */
.prose a,
.page-section a:not([class]),
.person-card__contacts a,
.office-card__body a {
  color: var(--green-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.prose a:hover,
.page-section a:not([class]):hover,
.person-card__contacts a:hover,
.office-card__body a:hover {
  color: var(--green);
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Utility bar — white */
.util-bar {
  background: var(--white);
  color: var(--muted);
  font-size: 0.78rem;
  min-height: var(--util-h);
  border-bottom: 1px solid var(--line);
}

.util-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--util-h);
}

.util-bar__itmt {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  color: var(--ink);
}

.util-bar__itmt:hover {
  color: var(--green-deep);
}

.util-bar__itmt-mark {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--green);
  color: var(--white);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius);
}

.util-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.util-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius);
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.util-btn:hover,
.util-btn:focus-visible {
  background: var(--green-soft);
  color: var(--green-deep);
}

.util-btn--alert {
  color: #c0392b;
}

.util-btn--icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 2px;
}

/* Header — green */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #00a052;
  color: var(--white);
  border-bottom: 1px solid rgba(0, 61, 24, 0.18);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 28px rgba(0, 61, 24, 0.22);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  min-height: var(--header-h);
  padding-block: 0.65rem;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin-right: 0.25rem;
  text-decoration: none;
  border-radius: 4px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.brand:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* Logo plate — green background, white type */
.brand__mark {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  min-width: 148px;
  padding: 0.55rem 0.95rem 0.5rem;
  background: #00a052;
  color: var(--white);
  border-radius: 4px;
  line-height: 1.05;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.brand__top {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand__bottom {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  padding-left: 0.32em; /* optical center with letter-spacing */
  opacity: 0.95;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
}

.main-nav__item {
  position: relative;
}

.main-nav__trigger,
.main-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 48px;
  padding: 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.94);
  position: relative;
}

.main-nav__trigger::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.55rem;
  height: 2px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav__item:hover .main-nav__trigger::after,
.main-nav__item:focus-within .main-nav__trigger::after,
.main-nav__link:hover::after {
  transform: scaleX(1);
}

.main-nav__en {
  font-family: var(--display);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}

.mega {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 280px;
  padding: 0.65rem;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 20;
}

.main-nav__item:hover .mega,
.main-nav__item:focus-within .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega a {
  display: block;
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.mega a:hover {
  background: var(--green-soft);
  color: var(--green-deep);
  padding-left: 1rem;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.lang-switch:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
  position: fixed;
  inset: calc(var(--util-h) + var(--header-h)) 0 0 0;
  background: rgba(20, 32, 24, 0.35);
  z-index: 40;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav__panel {
  background: var(--white);
  max-height: 100%;
  overflow: auto;
  padding: 0.5rem 1rem 2rem;
  border-top: 1px solid var(--line);
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-nav details {
  border-bottom: 1px solid var(--line);
}

.mobile-nav summary,
.mobile-nav__plain {
  display: block;
  padding: 1rem 0.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav details a {
  display: block;
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Full-bleed hero — images only, not clickable */
.hero {
  position: relative;
  min-height: min(62vh, 560px);
  overflow: hidden;
  background: #0a1a10;
}

.hero__media {
  position: absolute;
  inset: 0;
  pointer-events: none; /* no clickable links on hero images */
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.1s ease, transform 7s ease;
}

.hero__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.hero__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 40, 18, 0.12) 0%, rgba(0, 40, 18, 0.28) 100%);
}

.hero__dots {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.45rem;
}

.hero__dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.hero__dots button.is-active {
  background: var(--white);
  transform: scale(1.2);
}

/* Green title — matches original VDA QMC logo block */
.title-green {
  background: #00a052;
  color: var(--white);
  text-align: center;
  padding: 2rem 1rem 1.85rem;
}

.title-green__inner {
  max-width: 640px;
}

.title-green__brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.title-green__china {
  margin: 0.55rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.32em;
}

.crumb-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.crumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  font-size: 0.82rem;
  color: var(--muted);
}

.crumb a:hover {
  color: var(--green);
  text-decoration: underline;
}

.crumb__sep {
  opacity: 0.6;
}

/* Homepage mosaic after hero */
.section--mosaic {
  padding: 1.5rem 0 3.5rem;
}

.mosaic {
  display: grid;
  gap: 14px;
}

.mosaic--after-hero {
  grid-template-columns: repeat(4, 1fr);
}

.mosaic__video {
  grid-column: 1 / -1;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  background: #111;
  border-radius: 14px;
}

.mosaic__video video {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
  background: #000;
  border-radius: 14px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  min-height: 260px;
  padding: 1.35rem 1.2rem;
  color: var(--white);
  background-color: var(--tile-bg, var(--green));
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 20%, rgba(0, 0, 0, 0.55) 100%), var(--tile-img, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  border-radius: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tile--solid {
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 55%);
  justify-content: center;
  align-items: flex-start;
  gap: 0.85rem;
}

.tile--solid .tile__title {
  text-shadow: none;
  font-size: 1.25rem;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tile__title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.tile__sub {
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.95;
}

.tile__action {
  font-size: 0.86rem;
  font-weight: 600;
  opacity: 0.92;
  margin-top: 0.35rem;
}

.tile__action::after {
  content: " →";
}

/* Buttons (search dialog) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--green);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--green-deep);
}

.section {
  padding: 4.5rem 0;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  background: var(--green-ink);
  color: rgba(255, 255, 255, 0.86);
  padding: 3.5rem 0 1.5rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer h3 {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer__brand .brand__mark--footer {
  display: inline-grid;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.site-footer__tagline {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
}

.site-footer__social {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.site-footer__social a {
  display: block;
  line-height: 0;
}

.site-footer__social img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--white);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.25rem 0 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Back to top */
.back-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  background: var(--green);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Search dialog */
.search-dialog {
  border: 0;
  padding: 0;
  width: min(520px, calc(100% - 2rem));
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.search-dialog::backdrop {
  background: rgba(0, 40, 18, 0.45);
}

.search-dialog__form {
  position: relative;
  padding: 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.search-dialog__form label {
  font-weight: 700;
}

.search-dialog__row {
  display: flex;
  gap: 0.5rem;
}

.search-dialog__row input {
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0.9rem;
  font: inherit;
}

.search-dialog__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .mosaic--after-hero {
    grid-template-columns: 1fr 1fr;
  }

  .mosaic__video {
    grid-column: 1 / -1;
    min-height: 280px;
  }

  .mosaic__video video {
    min-height: 280px;
  }

  .tile {
    min-height: 220px;
  }
}

@media (max-width: 720px) {
  :root {
    --shell: min(1180px, calc(100% - 1.75rem));
    --header-h: 72px;
  }

  .util-bar__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.45rem 0;
    gap: 0.35rem;
  }

  .util-bar__actions {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
  }

  .brand__mark {
    min-width: 128px;
    padding: 0.45rem 0.75rem 0.4rem;
  }

  .brand__top {
    font-size: 1.05rem;
  }

  .brand__bottom {
    font-size: 0.66rem;
  }

  .hero {
    min-height: 48vh;
  }

  .mosaic--after-hero {
    grid-template-columns: 1fr;
  }

  .mosaic__video,
  .tile {
    min-height: 210px;
  }

  .mosaic__video video {
    min-height: 210px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__legal {
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__slide {
    transform: none;
  }
}
