/* ==========================================================================
   南京福伦特科技 - 官网共享样式
   设计风格：简约大气 · 科技蓝 · 留白克制
   遵循 Web Development 技能：CSS 变量、移动优先、:focus-visible、
   语义化、4.5:1 对比度、避免布局抖动
   ========================================================================== */

/* ---------- Design Tokens（:root 全局作用域）---------- */
:root {
  /* 品牌色 */
  --color-primary: #1a56db;
  --color-primary-dark: #1338a3;
  --color-accent: #0ea5e9;
  --color-ink: #0f172a;
  --color-ink-soft: #334155;
  --color-muted: #64748b;
  --color-line: #e2e8f0;
  --color-bg: #ffffff;
  --color-bg-soft: #f8fafc;
  --color-bg-tint: #eff6ff;

  /* 字体 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* 布局 */
  --container: 1140px;
  --gutter: 20px;
  --radius: 12px;
  --radius-sm: 8px;

  /* 动效 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
  /* 锚点跳转时为 sticky 导航留出空间 */
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* 图片自适应，避免溢出；尺寸由属性或样式显式给出以防 CLS */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: var(--color-ink);
}

p {
  margin: 0 0 1em;
  color: var(--color-ink-soft);
}

/* 键盘用户专用焦点环，不移除 :focus 的可访问性 */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: 64px;
}

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-ink);
  letter-spacing: 0.02em;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.brand__sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--color-muted);
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--color-ink-soft);
  padding-block: 6px;
  position: relative;
  transition: color 0.2s var(--ease);
}

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

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

.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary);
}

.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav__toggle svg {
  width: 22px;
  height: 22px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

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

.btn--ghost:hover {
  background: var(--color-bg-tint);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0b1e4d 0%, #123888 55%, #1a56db 100%);
  color: #fff;
  padding-block: 88px 96px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(14, 165, 233, 0.35), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(26, 86, 219, 0.4), transparent 45%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #bfdbfe;
  border: 1px solid rgba(191, 219, 254, 0.35);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 16em;
}

.hero__lead {
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.18rem);
  max-width: 34em;
  margin-bottom: 34px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero .btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.hero .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- Section heading ---------- */
.section-head {
  max-width: 44em;
  margin-bottom: 40px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head__kicker {
  display: block;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  letter-spacing: -0.01em;
}

.section-head p {
  font-size: 1.02rem;
  color: var(--color-muted);
}

/* ---------- Cards grid ---------- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

/* 服务分组标题 */
.group-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-line);
}

.group-head--spaced {
  margin-top: 52px;
}

.group-head__index {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.05em;
}

.group-head h3 {
  font-size: 1.35rem;
  margin: 0;
}

.group-head p {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

@media (min-width: 768px) {
  .group-head p {
    flex-basis: auto;
    margin: 0 0 0 auto;
  }
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #c7d7f5;
}

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-tint);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.card__icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  font-size: 1.16rem;
  margin-bottom: 10px;
}

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

/* ---------- Quote ---------- */
.quote {
  max-width: 52em;
  margin-inline: auto;
  padding: 30px 34px;
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--color-bg-tint);
}

.quote p {
  font-size: 1.06rem;
  color: var(--color-ink-soft);
  margin: 0 0 12px;
}

.quote p:last-child {
  margin-bottom: 0;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  text-align: center;
}

.stat__num {
  display: block;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}

.stat__label {
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* ---------- Split (image/text) ---------- */
.split {
  display: grid;
  gap: 36px;
  align-items: center;
}

.split__visual {
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--color-bg-tint), #dbeafe);
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--color-primary);
}

.split__visual svg {
  width: 100%;
  max-width: 360px;
  height: auto;
}

.split h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 52px;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}

.step h3 {
  font-size: 1.08rem;
  margin-bottom: 6px;
}

.step p {
  color: var(--color-muted);
  font-size: 0.94rem;
  margin: 0;
}

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(135deg, #123888, #1a56db);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px 36px;
  text-align: center;
}

.cta h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
}

.cta p {
  color: #dbeafe;
  max-width: 34em;
  margin-inline: auto;
}

.cta .btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.cta .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 36px;
}

.contact-info {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.contact-info li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-info svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--color-primary);
  margin-top: 3px;
}

.contact-info strong {
  display: block;
  color: var(--color-ink);
}

.contact-info span {
  color: var(--color-muted);
}

.form-card {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 7px;
  color: var(--color-ink);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

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

.field input:focus,
.field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
  outline: none;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 10px 0 0;
}

.form-status {
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-primary);
  min-height: 1.4em;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(160deg, #0b1e4d, #163b8c);
  color: #fff;
  padding-block: 64px 72px;
  text-align: center;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
}

.page-hero p {
  color: #bfdbfe;
  max-width: 40em;
  margin-inline: auto;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0b1220;
  color: #cbd5e1;
  padding-block: 52px 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .brand {
  color: #fff;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-top: 14px;
  max-width: 26em;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 9px;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 22px;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

/* ---------- Responsive: tablet ---------- */
@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) {
  .section {
    padding-block: 88px;
  }

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

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

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

  .split {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }

  .contact-grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 56px;
  }

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

/* ---------- Responsive: mobile nav ---------- */
@media (max-width: 767px) {
  .nav__toggle {
    display: inline-flex;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-line);
    padding: 8px var(--gutter) 16px;
    box-shadow: var(--shadow-md);
    /* 隐藏但保留在 DOM，避免 display:none 对屏幕阅读器的影响 */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
      visibility 0.2s var(--ease);
  }

  .nav__links.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .nav__link {
    padding-block: 12px;
    border-bottom: 1px solid var(--color-line);
  }

  .nav__link[aria-current="page"]::after {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
