/* ============================================================
   Yarn Dental Lab — 全局样式（响应式，深海军蓝 + 金色点缀）
   ============================================================ */

:root {
  --navy: #0b1f33;
  --navy-2: #12283c;
  --navy-3: #1b3a55;
  --gold: #c9a24b;
  --gold-light: #e0c06a;
  --text: #1f2a37;
  --muted: #5b6b7c;
  --bg: #f6f8fa;
  --white: #ffffff;
  --border: #e3e8ee;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(11, 31, 51, 0.10);
  --font-body: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--navy); text-decoration: none; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

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

.logo {
  display: inline-flex;
  background: var(--white);
  padding: 5px 12px;
  border-radius: 8px;
}
.logo img { height: 40px; width: auto; }

.main-nav { display: flex; gap: 6px; }

.main-nav a {
  color: #c8d4df;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 15px;
  transition: color 0.2s, background 0.2s;
}

.main-nav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }

.main-nav a.active { color: var(--gold-light); }

.nav-cta {
  background: var(--gold);
  color: var(--navy) !important;
  font-weight: 600;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--gold-light) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 英雄区 ---------- */
.hero {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(201, 162, 75, 0.18), transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: var(--white);
  padding: 110px 0 90px;
  text-align: center;
}

.hero .kicker {
  color: var(--gold-light);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.2;
  margin-bottom: 18px;
}

.hero p {
  max-width: 680px;
  margin: 0 auto 34px;
  color: #c8d4df;
  font-size: 18px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.5); margin-left: 12px; }
.btn-outline:hover { border-color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }

/* ---------- 通用区块 ---------- */
.section { padding: 76px 0; }
.section.alt { background: var(--white); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head .kicker { color: var(--gold); letter-spacing: 3px; text-transform: uppercase; font-size: 13px; }
.section-head h2 { font-family: var(--font-head); font-size: clamp(26px, 4vw, 38px); color: var(--navy); margin: 8px 0 12px; }
.section-head p { color: var(--muted); }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 26px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card img { width: 100%; height: 200px; object-fit: cover; background: var(--navy-2); }
.card-body { padding: 22px; }
.card-body h3 { font-family: var(--font-head); color: var(--navy); font-size: 20px; margin-bottom: 10px; }
.card-body p { color: var(--muted); font-size: 15px; }
.card-meta { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 14px; color: var(--muted); }
.card-meta strong { color: var(--navy); }

/* ---------- 统计数字 ---------- */
.stats { background: var(--navy); color: var(--white); }
.stats .grid { text-align: center; }
.stat-number { font-family: var(--font-head); font-size: 44px; color: var(--gold-light); }
.stat-label { color: #c8d4df; font-size: 15px; margin-top: 4px; }

/* ---------- CTA 横幅 ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  color: var(--white);
  text-align: center;
  padding: 64px 20px;
  border-radius: var(--radius);
}
.cta-banner h2 { font-family: var(--font-head); font-size: clamp(24px, 3.5vw, 34px); margin-bottom: 14px; }
.cta-banner p { color: #c8d4df; max-width: 560px; margin: 0 auto 28px; }

/* ---------- 关于页 ---------- */
.about-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.about-split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about-split h2 { font-family: var(--font-head); color: var(--navy); font-size: 32px; margin-bottom: 16px; }
.about-split p { color: var(--muted); margin-bottom: 14px; }

.certs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.cert-chip {
  background: var(--white);
  border: 1px solid var(--gold);
  color: var(--navy);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}

.mission-box {
  background: var(--white);
  border-left: 4px solid var(--gold);
  padding: 26px 30px;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  font-size: 17px;
  color: var(--navy);
  font-style: italic;
}

/* ---------- 技术页 / 工作流程 ---------- */
.tech-card { text-align: center; padding: 30px 22px; }
.tech-card img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; margin-bottom: 18px; }
.tech-card h3 { font-family: var(--font-head); color: var(--navy); margin-bottom: 8px; }
.tech-card p { color: var(--muted); font-size: 15px; }

.timeline { counter-reset: step; max-width: 760px; margin: 0 auto; }
.timeline-item {
  display: flex;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-num {
  counter-increment: step;
  flex: 0 0 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 22px;
}
.timeline-num::before { content: counter(step); }
.timeline-item h3 { color: var(--navy); margin-bottom: 4px; font-size: 18px; }
.timeline-item p { color: var(--muted); font-size: 15px; }

/* ---------- 联系页 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; align-items: start; }

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.info-card .icon { font-size: 22px; line-height: 1.4; }
.info-card h3 { color: var(--navy); font-size: 16px; margin-bottom: 2px; }
.info-card p, .info-card a { color: var(--muted); font-size: 15px; word-break: break-all; }
.info-card a:hover { color: var(--gold); }

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.form-card h2 { font-family: var(--font-head); color: var(--navy); margin-bottom: 6px; }
.form-card > p { color: var(--muted); font-size: 15px; margin-bottom: 24px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 6px; }
.form-group label .req { color: #c0392b; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.18);
}
.form-group textarea { min-height: 130px; resize: vertical; }

#form-message { margin-top: 16px; }
.success-message {
  background: #e8f7ee;
  border: 1px solid #b8e2c6;
  color: #1d7a3d;
  padding: 14px 18px;
  border-radius: 8px;
}
.error-message {
  background: #fdecea;
  border: 1px solid #f5c6c0;
  color: #b03a2e;
  padding: 14px 18px;
  border-radius: 8px;
}

/* ---------- WhatsApp 悬浮按钮 ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--navy); color: #c8d4df; padding: 56px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px; padding-bottom: 40px; }
.site-footer h4 { color: var(--white); font-family: var(--font-head); margin-bottom: 14px; font-size: 17px; }
.site-footer a { color: #c8d4df; display: block; padding: 4px 0; font-size: 15px; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer p { font-size: 15px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0;
  text-align: center;
  font-size: 14px;
  color: #8a97a5;
}

/* ---------- 页面内横幅（子页面顶部） ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}
.page-hero h1 { font-family: var(--font-head); font-size: clamp(30px, 4.5vw, 44px); margin-bottom: 10px; }
.page-hero p { color: #c8d4df; max-width: 640px; margin: 0 auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about-split, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy-2);
    flex-direction: column;
    padding: 12px 20px 20px;
    gap: 2px;
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 10px; font-size: 16px; }
  .nav-cta { margin-left: 0; text-align: center; margin-top: 8px; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 60px; }
  .btn-outline { margin-left: 0; margin-top: 12px; }
}

@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-card { padding: 24px; }
  .section { padding: 56px 0; }
}
