/* ==========================================================================
   Quam Studio — B2B Web Agency Stylesheet
   Design system: Flat B2B minimal, generous whitespace, Inter typeface
   Primary: #0F3460 (deep blue) | Accent: #E94560 (coral red)
   Performance: no web fonts blocking (Inter preconnected), pure CSS, no frameworks
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --primary: #0F3460;
  --primary-dark: #0A2547;
  --primary-light: #1A4A85;
  --accent: #E94560;
  --accent-hover: #D63A53;
  --text-main: #1F2937;
  --text-muted: #5B6B7C;
  --bg-page: #FFFFFF;
  --bg-soft: #F5F7FA;
  --bg-primary: #0F3460;
  --border: #E5E9F0;
  --white: #FFFFFF;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(15, 52, 96, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 52, 96, 0.10);
  --container: 1140px;
  --section-y: 96px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--primary-dark); }
/* html 画布背景=页脚同色：滚动到页面底部继续惯性/越界滚动时，露出的区域与页脚连成一体，不出现白条 */

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-main);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

ul { list-style: none; }

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: var(--section-y); }
.hero + .section { padding-top: 64px; }
.section-soft { background: var(--bg-soft); }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-sub { font-size: 18px; color: var(--text-muted); }

/* ---------- Buttons (flat, high contrast) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover, .btn-accent:focus-visible { background: var(--accent-hover); color: var(--white); }
/* 移动端导航弹出后，按钮文字保持白色（不被 .nav-links a 深色规则覆盖） */
.nav-links a.btn-accent, .nav-links a.btn-accent:hover, .nav-links a.btn-accent:focus-visible { color: var(--white); }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--primary-light); color: var(--white); }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--primary); color: var(--white); }

.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-ghost-light:hover, .btn-ghost-light:focus-visible { background: var(--white); color: var(--primary); }

.btn-lg { padding: 16px 36px; font-size: 17px; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 14px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--primary-dark);
}

.logo:hover { color: var(--primary-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  padding: 8px 9px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover { color: var(--primary); background: var(--bg-soft); }

.nav-links a[aria-current="page"] { color: var(--primary); font-weight: 600; }

.nav-cta .btn { padding: 11px 14px; font-size: 15px; white-space: nowrap; }

/* Mobile-only CTA inside the collapsed menu (hidden on desktop) */
.nav-cta-mobile { display: none; }

/* Mobile menu button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 6px;
}

.nav-toggle:hover { background: var(--bg-soft); }

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary-dark);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--primary-dark);
  background-image: url('../images/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  padding-block: 140px 120px;
  overflow: hidden;
}

/* Dark overlay on hero background for text legibility */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 52, 96, 0.92) 0%, rgba(15, 52, 96, 0.78) 45%, rgba(15, 52, 96, 0.55) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--white);
}

.hero h1 .accent { color: var(--accent); }

.hero p.lead {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }

.hero-trust svg { flex-shrink: 0; }

/* Hero dashboard mockup floating on the right */
.hero-visual {
  position: relative;
  display: block;
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: -40px -28px -40px -40px;
  background: radial-gradient(ellipse at center, rgba(233, 69, 96, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  padding: 28px;
  color: var(--text-main);
}

.hero-card .bar { height: 10px; border-radius: 5px; background: var(--bg-soft); margin-bottom: 14px; }
.hero-card .bar.short { width: 55%; }
.hero-card .bar.accent { background: var(--accent); width: 38%; }

.hero-card .row { display: flex; gap: 12px; margin-bottom: 14px; }
.hero-card .box {
  flex: 1;
  height: 84px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-card .box strong { font-size: 22px; color: var(--primary); font-weight: 800; }

.hero-badge {
  position: absolute;
  top: -18px;
  right: -12px;
  background: var(--accent);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding-block: 72px 64px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 14px;
}

.page-hero p { font-size: 18px; color: rgba(255, 255, 255, 0.85); max-width: 640px; margin-inline: auto; }

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

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: rgba(15, 52, 96, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card h3 { font-size: 20px; font-weight: 700; color: var(--primary-dark); margin-bottom: 10px; }

.card p { font-size: 15px; color: var(--text-muted); }

.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 16px;
}

/* Feature list inside cards */
.card ul.checks { margin-top: 16px; }
.card ul.checks li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 10px;
}

.card ul.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(233, 69, 96, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

/* ---------- Pain points ---------- */
.pain-item {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.pain-item .pain-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: rgba(233, 69, 96, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pain-item h3 { font-size: 17px; font-weight: 700; color: var(--primary-dark); margin-bottom: 6px; }
.pain-item p { font-size: 15px; color: var(--text-muted); }

/* ---------- Stats band ---------- */
.stats-band {
  background: var(--primary-dark);
  color: var(--white);
  padding-block: 56px;
}

.stats-band .grid-4 { text-align: center; }
.stats-band .stat strong { display: block; font-size: 38px; font-weight: 800; color: var(--white); }
.stats-band .stat span { font-size: 14px; color: rgba(255, 255, 255, 0.7); }

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.testimonial .stars { color: #F5A623; font-size: 16px; letter-spacing: 2px; }

.testimonial blockquote {
  font-size: 16px;
  color: var(--text-main);
  line-height: 1.7;
  font-style: normal;
}

.testimonial .author { display: flex; align-items: center; gap: 12px; margin-top: auto; }

.testimonial .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.testimonial .author strong { display: block; font-size: 15px; color: var(--primary-dark); }
.testimonial .author span { font-size: 13px; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--primary);
  color: var(--white);
  padding-block: 72px;
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 14px;
}

.cta-band p { font-size: 17px; color: rgba(255, 255, 255, 0.85); margin-bottom: 32px; }

/* ---------- Pricing ---------- */
.pricing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-md);
}

.pricing-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
}

.pricing-card h3 { font-size: 21px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }

.pricing-card .price {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.pricing-card .price small { font-size: 15px; font-weight: 500; color: var(--text-muted); }

.pricing-card .price-note { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

.pricing-card ul.checks { margin-bottom: 28px; flex-grow: 1; }

/* ---------- Process (About page) ---------- */
.process-list { counter-reset: step; display: grid; gap: 20px; }

.process-item {
  display: flex;
  gap: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  counter-increment: step;
}

.process-item::before {
  content: counter(step, decimal-leading-zero);
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  min-width: 48px;
}

.process-item h3 { font-size: 18px; font-weight: 700; color: var(--primary-dark); margin-bottom: 6px; }
.process-item p { font-size: 15px; color: var(--text-muted); }

/* ---------- FAQ accordion ---------- */
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  color: var(--primary-dark);
  text-align: left;
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-q:hover { background: var(--bg-soft); }

.faq-q .chev {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: var(--accent);
}

.faq-q[aria-expanded="true"] .chev { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-a-inner { padding: 0 24px 22px; font-size: 15px; color: var(--text-muted); line-height: 1.7; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }

.form-field label { font-size: 14px; font-weight: 600; color: var(--primary-dark); }

/* 联系表单同意复选框：原生框隐藏（保留可访问性），自绘 20px 圆角方框+品牌色勾选 */
.form-field input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.cf-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--white);
  flex-shrink: 0;
  box-sizing: border-box;
  position: relative;
  margin-top: 1px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.form-field input[type="checkbox"]:checked + .cf-box {
  background: var(--accent);
  border-color: var(--accent);
}
.form-field input[type="checkbox"]:checked + .cf-box::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form-field input[type="checkbox"]:focus-visible + .cf-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text-main);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  min-width: 0;
  max-width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.12);
}

.form-note { font-size: 13px; color: var(--text-muted); }

.form-success {
  display: none;
  background: #EAF6EC;
  border: 1px solid #B7DFBF;
  color: #1E6B34;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 15px;
  margin-top: 16px;
}

.form-success.visible { display: block; }

/* ---------- Contact info ---------- */
.contact-info-item {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.contact-info-item:last-child { border-bottom: none; }

.contact-info-item .icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: rgba(15, 52, 96, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-item h3 { font-size: 16px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.contact-info-item p { font-size: 15px; color: var(--text-muted); }

/* ---------- Work / portfolio ---------- */
.work-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.work-thumb {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 14px 18px;
  color: var(--white);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 0 14px rgba(0, 0, 0, 0.3);
}

.work-body { padding: 28px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }

.work-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(233, 69, 96, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
}

.work-body h3 { font-size: 20px; font-weight: 700; color: var(--primary-dark); }
.work-body p { font-size: 15px; color: var(--text-muted); }

.work-results {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.work-results strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); margin-bottom: 8px; }

.work-results li { font-size: 14px; color: var(--text-main); padding-left: 22px; position: relative; margin-bottom: 6px; }
.work-results li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ---------- Case study cards (clickable) ---------- */
.case-card { transition: box-shadow 0.15s ease, border-color 0.15s ease; }
.case-card:hover { box-shadow: 0 4px 24px rgba(15, 52, 96, 0.12); border-color: var(--primary); }
.work-thumb-link { display: block; text-decoration: none; color: inherit; }
.work-thumb-link:hover .work-thumb { opacity: 0.92; }
.work-body h3 a { color: var(--primary-dark); text-decoration: none; }
.work-body h3 a:hover { color: var(--accent); }

/* ---------- Case detail page ---------- */
.case-detail { max-width: 820px; margin-inline: auto; }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.case-sector { font-size: 13px; color: var(--text-muted); }
.case-meta span:last-child { font-size: 13px; color: var(--text-muted); margin-left: auto; }
.case-hero { position: relative; aspect-ratio: 21 / 9; font-size: 24px; font-weight: 700; border-radius: var(--radius-lg); margin: 28px 0; overflow: hidden; }
.case-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(15, 52, 96, 0.55) 0%, rgba(15, 52, 96, 0.25) 100%); pointer-events: none; }
.case-results-box {
  margin-top: 32px;
  padding: 28px 32px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.case-results-box h2 { font-size: 20px; font-weight: 700; color: var(--primary-dark); margin-bottom: 16px; }
.case-results-box .work-results { margin-top: 0; padding-top: 0; border-top: none; }

/* ---------- Legal pages ---------- */
.legal-content { max-width: 780px; margin-inline: auto; }

.legal-content h2 { font-size: 22px; font-weight: 700; color: var(--primary-dark); margin: 40px 0 12px; }
.legal-content h2:first-of-type { margin-top: 0; }

.legal-content p, .legal-content li { font-size: 15px; color: var(--text-muted); line-height: 1.75; margin-bottom: 12px; }

.legal-content ul { padding-left: 22px; list-style: disc; }

.legal-meta { font-size: 13px; color: var(--text-muted); padding: 12px 18px; background: var(--bg-soft); border-radius: var(--radius); margin-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: rgba(255, 255, 255, 0.75); padding-block: 64px 32px; font-size: 15px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-grid h3 { font-size: 15px; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 18px; }

.footer-grid ul { padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: 10px; }

.footer-grid a { color: rgba(255, 255, 255, 0.75); }
.footer-grid a:hover { color: var(--white); }

.footer-brand p { max-width: 320px; margin-top: 16px; font-size: 14px; line-height: 1.7; }

.footer-logo { display: inline-flex; align-items: center; font-size: 19px; font-weight: 400; color: var(--white); }

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- GDPR Cookie Consent ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(15, 52, 96, 0.15);
  padding: 20px 0;
  display: none;
}

.cookie-banner.visible { display: block; }

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-inner p { font-size: 14px; color: var(--text-muted); max-width: 640px; }

.cookie-inner p a { font-weight: 600; color: var(--primary); text-decoration: underline; }

.cookie-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.cookie-actions .btn { padding: 10px 22px; font-size: 14px; }

/* ---------- Breadcrumb (SEO) ---------- */
.breadcrumb { font-size: 14px; color: var(--text-muted); padding-block: 18px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--border); }

/* ---------- Language switcher / header right side (base) ----------
   IMPORTANT: these base rules MUST stay ABOVE the @media blocks below.
   Equal-specificity responsive overrides only win when they come later. */
.nav-right { display: flex; align-items: center; gap: 16px; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 8px 11px;
  min-height: 40px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-switch a:hover { color: var(--primary); background: var(--bg-soft); }

.lang-switch a.active { background: var(--primary); color: var(--white); }
.lang-switch a.active:hover { color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  :root { --section-y: 72px; }

  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 480px; margin-inline: auto; }
  .hero { padding-block: 110px 90px; }

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

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

/* Header collapses to hamburger at ≤1199px (9 nav items + 6-lang switch need the room) */
@media (max-width: 1199px) {
  .nav-links, .nav-cta { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open a { padding: 12px 16px; }
  .nav-links.open .nav-cta-mobile { display: block; margin-top: 8px; }
  .nav-links.open .nav-cta-mobile .btn { width: 100%; }
  .nav-toggle { display: block; flex-shrink: 0; }
  .nav { gap: 12px; }
  .nav-right { gap: 10px; flex-shrink: 0; }
  .lang-switch a { min-height: 40px; padding: 6px 9px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open a { padding: 12px 16px; }
  .nav-links.open .nav-cta-mobile { display: block; margin-top: 8px; }
  .nav-links.open .nav-cta-mobile .btn { width: 100%; }
  .nav-toggle { display: block; flex-shrink: 0; }
  .nav { gap: 12px; }
  .nav-right { gap: 10px; flex-shrink: 0; }

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

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

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

  .cookie-inner { flex-direction: column; align-items: flex-start; }

  .hero { padding-block: 96px 80px; }
  .hero::before { background: linear-gradient(180deg, rgba(15, 52, 96, 0.88) 0%, rgba(15, 52, 96, 0.78) 100%); }
}

/* Ultra-small phones (≤400px): shrink language switch so header never overflows */
@media (max-width: 400px) {
  .nav { gap: 6px; }
  .logo { font-size: 16px; letter-spacing: 0.06em; }
  .lang-switch a { min-height: 38px; padding: 5px 6px; font-size: 11px; }
  .nav-toggle { min-width: 44px; min-height: 44px; }
  .hero h1 { font-size: 30px; }
  .hero-card { padding: 22px; }
  .hero-card .box { height: 72px; }
  .hero-card .box strong { font-size: 18px; }
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  background: var(--primary);
  color: var(--white);
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 20px;
  overflow: visible;
  clip: auto;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   ADD-ON MODULES: Language switcher, Blog, Mobile hardening
   (No changes to existing color tokens, fonts, or business logic)
   ========================================================================== */

/* ---------- Blog: list page ---------- */
.blog-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.blog-thumb {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.blog-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 52, 96, 0.26) 0%, rgba(15, 52, 96, 0.08) 100%);
  pointer-events: none;
}
.blog-thumb > * { position: relative; z-index: 1; }

.blog-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.blog-meta .blog-cat { color: var(--accent); font-weight: 700; }

.blog-body h2 { font-size: 19px; font-weight: 700; color: var(--primary-dark); line-height: 1.35; }

.blog-body h2 a { color: inherit; }
.blog-body h2 a:hover { color: var(--accent); }

.blog-body p { font-size: 15px; color: var(--text-muted); }

.blog-body .card-link { margin-top: auto; }

/* ---------- Blog: pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
}

.pagination button {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 48px;
  min-height: 48px;
  padding: 0 18px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }

.pagination button.current {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination .page-info { font-size: 14px; color: var(--text-muted); padding: 0 8px; }

/* ---------- Blog: article page ---------- */
.post { max-width: 760px; margin-inline: auto; }

.post-header { margin-bottom: 36px; }

.post-header .blog-meta { margin-bottom: 14px; font-size: 14px; }

.post-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.post-header .post-excerpt { font-size: 18px; color: var(--text-muted); }

.post-hero {
  position: relative;
  aspect-ratio: 16 / 8;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
}
.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 52, 96, 0.50) 0%, rgba(15, 52, 96, 0.30) 100%);
  pointer-events: none;
}
.post-hero > * { position: relative; z-index: 1; }

/* Semantic heading scale H1–H6 inside articles */
.post-body h2 { font-size: 26px; font-weight: 700; color: var(--primary-dark); margin: 40px 0 14px; }
.post-body h3 { font-size: 21px; font-weight: 700; color: var(--primary-dark); margin: 32px 0 12px; }
.post-body h4 { font-size: 18px; font-weight: 600; color: var(--primary); margin: 28px 0 10px; }
.post-body h5 { font-size: 16px; font-weight: 600; color: var(--primary); margin: 24px 0 8px; }
.post-body h6 { font-size: 15px; font-weight: 600; color: var(--text-muted); margin: 22px 0 8px; }
.post-body p { font-size: 17px; color: var(--text-main); line-height: 1.8; margin-bottom: 18px; }

/* 文章清单：编号/符号在左侧，换行文本与首行文字对齐（悬挂式） */
.post-body ol,
.post-body ul {
  padding-left: 1.7em;
  margin: 0 0 18px;
}
.post-body li {
  list-style-position: outside;
  margin-bottom: 10px;
  line-height: 1.75;
}

.post-placeholder {
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

/* Prev / next navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 48%;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.post-nav a:hover { border-color: var(--primary); }

.post-nav a small { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.post-nav a strong { font-size: 15px; color: var(--primary-dark); }

.post-nav a.next { margin-left: auto; text-align: right; }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 28px;
}

/* ---------- Mobile hardening (Core Web Vitals on phones) ---------- */
body { overflow-x: hidden; overflow-wrap: break-word; } /* no horizontal scroll, no text overflow */

@media (max-width: 768px) {
  /* Touch targets: interactive elements >= 48px */
  .btn { min-height: 48px; }
  .nav-toggle { min-width: 48px; min-height: 48px; }
  /* NOTE: .lang-switch a touch-target sizing lives in the ≤1199px collapse block
     and the ≤400px block. Do NOT re-declare it here — a later equal-specificity
     rule would override the ≤400px reduction and overflow the header. */
  .nav-links.open a { min-height: 48px; display: flex; align-items: center; }

  /* Fluid typography safeguards */
  h1, h2, h3, .section-title { overflow-wrap: break-word; }
  .hero-card .box strong { font-size: 20px; }
  .post-body p { font-size: 16px; }

  /* Cards / forms stack comfortably */
  .card, .pricing-card, .work-card, .blog-card { width: 100%; }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: 100%; }
  .post-nav a.next { text-align: left; margin-left: 0; }

  .pagination { flex-wrap: wrap; }
}

@media (max-width: 992px) {
  .blog-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .blog-list { grid-template-columns: 1fr; }
}

/* ---------- Language switcher: link variant (static subdirectory i18n) ---------- */
/* Note: .lang-switch a base styles live in the header section above (single source of truth). */
.lang-switch a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Services page: concept illustration on service cards ---------- */
.svc-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.2s ease;
}
.svc-col:hover { transform: translateY(-3px); }
.svc-card-img {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--primary);
  position: relative;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.svc-col .card {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-shadow: none;
}
.svc-col .card:hover { transform: none; box-shadow: none; }
.svc-card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 52, 96, 0) 52%, rgba(15, 52, 96, 0.62) 100%);
  pointer-events: none;
}
.svc-visual-cap {
  position: relative;
  z-index: 1;
  color: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  padding: 12px 18px;
  margin: 0;
}
.svc-col { display: flex; flex-direction: column; min-width: 0; }
.svc-col .svc-card-img { flex-shrink: 0; }

/* Narrow-widescreen guard: keep the header nav on one line down to ~1280px */
@media (max-width: 1680px) {
  .nav { gap: 10px; }
  .nav-links a { padding: 8px 7px; font-size: 14.5px; }
  .nav-cta .btn { padding: 11px 11px; font-size: 14px; }
}

