/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --soft: #f5f5f7;
  --muted: #5c5c61;          /* 6.6:1 on white, 6.0:1 on --soft */
  --line: #e2e2e6;
  --field-line: #85858b;     /* 3.7:1 on white (form control boundary) */
  --accent: #c8f03c;         /* the single accent: used for fills and on dark only */

  --dark-bg: #0a0a0a;
  --dark-muted: #a6a6ab;     /* 8:1 on --dark-bg */
  --dark-line: rgba(255, 255, 255, 0.16);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(72px, 11vw, 144px);
  --radius: 18px;
  --header-h: 64px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.875rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

svg {
  display: block;
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.dark :focus-visible {
  outline-color: var(--accent);
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 0.9375rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section.soft {
  background: var(--soft);
}

.dark {
  background: var(--dark-bg);
  color: var(--paper);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--ink);
}

.dark .eyebrow {
  color: var(--dark-muted);
}

.dark .eyebrow::before {
  box-shadow: none;
}

.lead {
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.5;
}

.dark .lead {
  color: var(--dark-muted);
}

.muted {
  color: var(--muted);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.9375rem;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: #2e2e31;
}

.btn-ghost {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
}

.btn-accent:hover {
  background: #ffffff;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 32px -20px rgba(10, 10, 10, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  flex: none;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding-block: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

/* Underline that draws in on hover / keyboard focus */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

/* Language toggle: EN | 中文 */
.lang-switch {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
  font-size: 0.875rem;
}

.no-js .lang-switch {
  display: none;               /* switching languages needs JavaScript */
}

.lang-btn {
  position: relative;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.lang-btn:hover,
.lang-btn[aria-pressed="true"] {
  color: var(--ink);
}

.lang-btn[aria-pressed="true"] {
  font-weight: 600;
  background: var(--soft);
}

.lang-btn::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 3px;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.lang-btn[aria-pressed="true"]::after {
  transform: scaleX(1);
}

.lang-sep {
  color: var(--field-line);
  font-size: 0.8125rem;
}

.nav-cta-item {
  display: none;
}

.nav-toggle {
  display: none;
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.nav-toggle-bars {
  position: relative;
  margin: 0 auto;
  transform: translateY(-3.5px);
}

.nav-toggle-bars::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateY(7px);
}

.site-header.is-open .nav-toggle-bars {
  transform: rotate(45deg);
}

.site-header.is-open .nav-toggle-bars::before {
  transform: rotate(-90deg);
}

@media (max-width: 1080px) {
  /* With JS: collapsible panel. */
  .js .nav-toggle {
    display: block;
  }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 8px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .js .site-header.is-open .site-nav {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .js .site-nav li + li {
    border-top: 1px solid var(--line);
  }

  .js .site-nav a {
    display: block;
    padding-block: 14px;
    color: var(--ink);
    font-size: 1.0625rem;
  }

  .js .site-nav a::after {
    display: none;
  }

  /* Without JS: links stay reachable as a scrollable second row. */
  .no-js .header-inner {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .no-js .site-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .no-js .site-nav ul {
    padding-bottom: 8px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    gap: 10px;
  }

  .header-cta {
    display: none;
  }

  .nav-cta-item {
    display: block;
  }

  .nav-cta-item a {
    font-weight: 600;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: clamp(48px, 8vw, 104px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.hero-copy .lead {
  margin-top: 28px;
}

.hl {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.hero-visual {
  justify-self: center;
  width: 100%;
  max-width: 500px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.hero-visual figcaption {
  margin: 20px auto 0;
  max-width: 32em;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--ink);
}

.facts > div {
  padding: 24px 24px 28px 0;
}

.facts > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts dd {
  font-size: clamp(1.0625rem, 1.8vw, 1.375rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 380px;
  }

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

  .facts > div {
    padding: 20px 16px 22px 0;
  }

  .facts > div + div {
    padding-left: 0;
    border-left: 0;
  }

  .facts > div:nth-child(even) {
    padding-left: 16px;
    border-left: 1px solid var(--line);
  }

  .facts > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

/* ==========================================================================
   Why us
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 28px 26px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: var(--ink);
}

.icon {
  width: 28px;
  height: 28px;
  margin-bottom: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  font-size: 1rem;
}

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

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .icon {
    margin-bottom: 28px;
  }
}

/* ==========================================================================
   Product spotlight
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.product-figure {
  justify-self: center;
  width: 100%;
  max-width: 440px;
}

.product-figure img {
  width: 100%;
  border-radius: var(--radius);
}

.product-figure figcaption {
  margin-top: 28px;
  color: var(--dark-muted);
  font-size: 0.9375rem;
  text-align: center;
}

.product-copy .lead {
  margin-top: 24px;
}

.spec-table {
  width: 100%;
  margin-block: 40px;
  border-collapse: collapse;
  border-top: 1px solid var(--dark-line);
  font-size: 1rem;
}

.spec-table th,
.spec-table td {
  padding: 15px 0;
  border-bottom: 1px solid var(--dark-line);
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  width: 34%;
  padding-right: 16px;
  color: var(--dark-muted);
  font-weight: 400;
}

.spec-table td {
  font-weight: 500;
}

.spec-table a {
  color: var(--accent);
}

@media (max-width: 860px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-figure {
    max-width: 340px;
  }
}

/* ==========================================================================
   Product gallery
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.gallery-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.gallery-card figcaption {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 500;
}

.gallery-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (max-width: 620px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ==========================================================================
   OEM process
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.steps li {
  position: relative;
  padding: 28px 20px 0 0;
  border-top: 1px solid var(--ink);
}

.steps li::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.steps li:last-child::before {
  background: var(--accent);
  box-shadow: 0 0 0 1.5px var(--ink);
}

.step-num {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.steps h3 {
  margin-bottom: 8px;
}

.steps p {
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (max-width: 1040px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 48px;
  }
}

@media (max-width: 620px) {
  .steps {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .steps li {
    padding: 0 0 36px 28px;
    border-top: 0;
    border-left: 1px solid var(--ink);
  }

  .steps li:last-child {
    padding-bottom: 0;
  }

  .steps li::before {
    top: 0;
    left: -5px;
  }

  .step-num {
    margin-bottom: 8px;
    line-height: 1;
  }
}

/* ==========================================================================
   Who we serve
   ========================================================================== */
.serve-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.serve-grid li {
  padding: clamp(28px, 4vw, 44px);
  background: var(--paper);
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.serve-grid h3 {
  margin-bottom: 12px;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  letter-spacing: -0.025em;
}

.serve-grid p {
  max-width: 30em;
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 700px) {
  .serve-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(24px, 6vw, 80px);
}

.faq-grid .section-head {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  margin-bottom: 0;
}

.faq-grid .section-head .muted {
  margin-top: 20px;
}

.faq-list {
  border-top: 1px solid var(--ink);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.012em;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  width: 15px;
  height: 1.5px;
  margin-top: -0.75px;
  background: var(--ink);
  transition: transform 0.2s ease;
}

.faq-list summary::after {
  transform: rotate(90deg);
}

.faq-list details[open] summary::after {
  transform: rotate(0deg);
}

.faq-list details p {
  max-width: 38em;
  padding: 0 48px 26px 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .faq-grid .section-head {
    position: static;
  }

  .faq-list details p {
    padding-right: 0;
  }
}

/* ==========================================================================
   Quote form
   ========================================================================== */
.quote-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: clamp(40px, 6vw, 80px);
}

.quote-copy .lead {
  margin-top: 24px;
}

.list-title {
  margin: 44px 0 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.check-list li {
  position: relative;
  padding: 12px 0 12px 26px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}

.check-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 1.25em;
  left: 2px;
  width: 7px;
  height: 7px;
  background: var(--ink);
}

.direct-mail {
  margin-top: 32px;
  color: var(--muted);
}

.direct-mail a {
  color: var(--ink);
  font-weight: 500;
}

.quote-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 16px;
  padding: clamp(24px, 4vw, 44px);
  background: var(--paper);
  border-radius: calc(var(--radius) + 6px);
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.label-hint {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;           /* >=16px: no zoom-on-focus on iOS */
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input {
  min-height: 48px;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #74747a;
  opacity: 1;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--ink);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid transparent;   /* stays visible in forced-colors mode */
  outline-offset: 2px;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), 0 0 0 4px var(--accent);
}

.hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 4px;
}

.form-actions .hint {
  flex: 1 1 220px;
  margin-top: 0;
}

.form-status {
  padding: 20px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  font-size: 0.9375rem;
}

.form-status[hidden] {
  display: none;
}

.form-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

#manual-copy {
  margin-top: 16px;
}

#request-text {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  font: inherit;
  resize: vertical;
}

.direct-mail a,
.footer-contact a {
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .quote-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .quote-form {
    grid-template-columns: 1fr;
  }

  .form-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding-top: clamp(56px, 8vw, 88px);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  padding-bottom: clamp(48px, 7vw, 72px);
}

.footer-brand p {
  max-width: 26em;
  margin-top: 16px;
  color: var(--dark-muted);
}

.site-footer h2 {
  margin-bottom: 16px;
  color: var(--dark-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer li {
  padding-block: 5px;
}

.site-footer li a {
  display: inline-block;
  padding-block: 3px;
  text-decoration: none;
}

.site-footer li a:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  position: relative;
  padding-block: 24px 32px;
  color: var(--dark-muted);
  font-size: 0.8125rem;
}

/* Hairline rule inset to the content width (the container keeps its side padding). */
.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--dark-line);
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Simplified Chinese typography
   ========================================================================== */
@media (max-width: 380px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

html:lang(zh) {
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

:lang(zh) body {
  line-height: 1.7;
  line-break: strict;
}

/* CJK glyphs are full-width: ease the tight Latin tracking and leading. */
:lang(zh) h1 {
  font-size: clamp(2.25rem, 5.4vw, 4rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

:lang(zh) h2 {
  line-height: 1.24;
  letter-spacing: -0.01em;
}

:lang(zh) h3,
:lang(zh) .facts dd,
:lang(zh) .serve-grid h3,
:lang(zh) .faq-list summary {
  letter-spacing: 0;
}

:lang(zh) .lead {
  line-height: 1.7;
}

/* ==========================================================================
   Motion
   ========================================================================== */

/* Hover lift (pointer devices only, so nothing sticks after a tap) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -14px rgba(10, 10, 10, 0.5);
  }

  .btn:active {
    transform: translateY(0);
    box-shadow: none;
  }

  .card:hover,
  .gallery-card:hover,
  .serve-grid li:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px -28px rgba(10, 10, 10, 0.4);
  }
}

/* Scroll reveal. script.js adds .reveal only to elements that start below the
   fold (and only when motion is allowed), then .is-in as they scroll into view,
   and removes both once the transition has finished. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

@media print {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .lang-changing main,
  .lang-changing .site-footer {
    animation: language-fade 0.2s ease-out;
  }

  @keyframes language-fade {
    from { opacity: 0.78; }
    to { opacity: 1; }
  }

  /* Hero entrance */
  .hero-copy > * {
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-copy > :nth-child(1) { animation-delay: 0.05s; }
  .hero-copy > :nth-child(2) { animation-delay: 0.13s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.21s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.29s; }

  .hero-visual {
    animation: hero-art 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
  }

  .facts > div {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .facts > :nth-child(1) { animation-delay: 0.45s; }
  .facts > :nth-child(2) { animation-delay: 0.52s; }
  .facts > :nth-child(3) { animation-delay: 0.59s; }
  .facts > :nth-child(4) { animation-delay: 0.66s; }

  /* Accent underline draws in under the headline */
  .hl {
    animation: hl-draw 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.8s both;
  }

  .intro-done .hl {
    animation-duration: 0.5s;
    animation-delay: 0s;
  }

  /* Small touches */
  .faq-list details[open] > p {
    animation: faq-open 0.3s ease both;
  }

  .js .site-header.is-open .site-nav {
    animation: nav-drop 0.22s ease both;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
  }

  @keyframes hero-art {
    from {
      opacity: 0;
      transform: translateY(26px) scale(0.97);
    }
  }

  @keyframes hl-draw {
    from {
      background-size: 0 0.2em;
    }
  }

  @keyframes faq-open {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
  }

  @keyframes nav-drop {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
  }
}

/* Reduced motion: no animation, no transitions, instant anchor jumps.
   (script.js also skips scroll reveal in this mode.) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
