/* ============================================================
   Yuanfu Robotics — Robotics & Automation
   Static site stylesheet. No external dependencies.
   ============================================================ */

:root {
  --ink: #0D1B2A;
  --ink-2: #4A5D70;
  --ink-3: #7B8B99;
  --line: #E4E9EB;
  --bg: #FFFFFF;
  --bg-2: #F5F7F6;
  --brand: #0B6E52;
  --brand-dark: #095C45;
  --brand-2: #12A87A;
  --brand-soft: #E8F5F0;
  --radius: 14px;
  --wrap: 1180px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Language toggle ---------- */
.t-zh { display: none; }
html.lang-zh .t-en { display: none; }
html.lang-zh .t-zh { display: inline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { flex: 0 0 auto; }
.logo-text {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1;
}
.logo-text small {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.13em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.nav { display: flex; gap: 32px; }
.nav a {
  position: relative;
  padding: 6px 0;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--ink); font-weight: 500; }
.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-btn {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 0.2s;
}
.lang-btn:hover { border-color: var(--ink-3); color: var(--ink); }

.menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  position: relative;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: 0.25s;
}
.menu-btn span { top: 50%; margin-top: -0.75px; }
.menu-btn span::before { content: ''; top: -5px; }
.menu-btn span::after { content: ''; top: 5px; }
body.nav-open .menu-btn span { background: transparent; }
body.nav-open .menu-btn span::before { top: 0; transform: translateX(-50%) rotate(45deg); }
body.nav-open .menu-btn span::after { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}
.btn:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: var(--bg-2);
  border-color: var(--ink-3);
  color: var(--ink);
}
.btn-light {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}
.btn-light:hover { background: #EDF3F0; border-color: #EDF3F0; }
.btn-sm { height: 38px; padding: 0 18px; font-size: 13.5px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 80% 6%, rgba(18, 168, 122, 0.10), transparent 62%),
    radial-gradient(700px 460px at 4% 98%, rgba(11, 110, 82, 0.06), transparent 60%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: 56px;
  padding: 88px 24px 96px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--brand);
}

.hero h1 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.07;
  letter-spacing: -0.032em;
}
.lead {
  margin-top: 24px;
  max-width: 560px;
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 46px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--ink-3);
}
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-2);
}

.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-visual svg { width: 100%; max-width: 420px; height: auto; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); }
.section-tight { padding: 72px 0; }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.025em; }
.section-head p {
  margin-top: 16px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* ---------- Grid & cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: 0.25s;
}
.card:hover {
  border-color: #C9D6D0;
  box-shadow: 0 14px 34px -20px rgba(13, 27, 42, 0.24);
  transform: translateY(-3px);
}
.card-num {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--brand-2);
}
.card h3 { font-size: 19px; margin-bottom: 12px; }
.card p { font-size: 14.5px; line-height: 1.72; color: var(--ink-2); }

.mini-list {
  margin-top: 20px;
  display: grid;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.mini-list li { position: relative; padding-left: 16px; }
.mini-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-2);
  opacity: 0.6;
}

.link-arrow {
  margin-top: auto;
  padding-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
}
.link-arrow::after { content: '\2192'; transition: transform 0.2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { padding: 32px 26px; background: #fff; }
.stat b {
  display: block;
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1.15;
}
.stat span {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ---------- Value rows ---------- */
.value-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.value { padding: 34px 30px; background: #fff; }
.value h3 { font-size: 16.5px; margin-bottom: 10px; }
.value p { font-size: 14px; line-height: 1.72; color: var(--ink-2); }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding: 64px 56px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
}
.cta-band h2 { font-size: clamp(23px, 2.6vw, 33px); letter-spacing: -0.025em; }
.cta-band p {
  margin-top: 14px;
  max-width: 520px;
  font-size: 15.5px;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.68);
}

/* ---------- Page header (inner pages) ---------- */
.page-head {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.page-head h1 { font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -0.03em; }
.page-head p {
  margin-top: 18px;
  max-width: 660px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* ---------- Products ---------- */
.prod-cat { margin-bottom: 76px; }
.prod-cat:last-child { margin-bottom: 0; }

.cat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.cat-head h2 { font-size: 25px; letter-spacing: -0.025em; }
.cat-head span { font-size: 13px; color: var(--ink-3); }

.prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.prod {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: 0.2s;
}
.prod:hover {
  border-color: #C9D6D0;
  box-shadow: 0 12px 28px -20px rgba(13, 27, 42, 0.22);
}
.prod h3 { font-size: 15.5px; margin-bottom: 8px; }
.prod p { font-size: 13.5px; line-height: 1.68; color: var(--ink-2); }
.prod .spec {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.notice {
  margin-top: 40px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-2);
  border-radius: 8px;
  background: var(--brand-soft);
  font-size: 13.5px;
  color: var(--ink-2);
}

/* ---------- About ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.prose p {
  margin-bottom: 18px;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink-2);
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 500; }

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { padding-top: 22px; border-top: 2px solid var(--line); }
.step b {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--brand-2);
  margin-bottom: 12px;
}
.step h3 { font-size: 16px; margin-bottom: 8px; }
.step p { font-size: 13.5px; line-height: 1.68; color: var(--ink-2); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: start;
}
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  transition: 0.2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(18, 168, 122, 0.13);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.contact-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.contact-card dl { margin: 0; }
.contact-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-item:first-child { padding-top: 0; }
.contact-item:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-item dt {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.contact-item dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink);
  word-break: break-word;
}
.contact-item dd a:hover { color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 64px 0 34px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.footer-brand p {
  margin-top: 16px;
  max-width: 300px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.footer-col h4 {
  margin-bottom: 16px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer-col a,
.footer-col p {
  display: block;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* ---------- Reveal animation ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Anchor targets clear the sticky header */
.prod-cat, #process { scroll-margin-top: 92px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; padding: 64px 24px 72px; gap: 44px; }
  .hero-visual { display: none; }
  .grid-4, .stats, .process { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -24px rgba(13, 27, 42, 0.3);
  }
  body.nav-open .nav { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .nav a:last-child { border-bottom: 0; }
  .nav a.is-active::after { display: none; }
  .menu-btn { display: block; }
  .header-actions .btn { display: none; }

  .section { padding: 64px 0; }
  .grid-3, .prod-grid, .grid-2 { grid-template-columns: 1fr; }
  .grid-4, .stats, .process { grid-template-columns: 1fr; }
  .value-row { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 28px; }
  .page-head { padding: 52px 0 40px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
