/* ===== Caely Girl 官网 — Apple 浅色极简设计系统 ===== */

:root {
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --bg: #ffffff;
  --bg-gray: #f5f5f7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: rgba(0, 113, 227, 0.15); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 导航 ===== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
#nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img { height: 30px; width: auto; }

.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 13px;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  transition: all 0.2s;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.menu-toggle span {
  width: 18px; height: 1.5px;
  background: var(--text);
  transition: transform 0.25s;
}

/* ===== Hero ===== */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #000;
}

.hero-media, .hero-media video, .hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.45) 60%, rgba(0,0,0,0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 120px 24px 80px;
  color: #fff;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 20px;
}

#hero h1 {
  font-size: clamp(38px, 6.5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  opacity: 0.9;
  max-width: 720px;
  margin: 0 auto 40px;
}

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  padding: 13px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.25s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }
.btn-ghost { border-color: rgba(255,255,255,0.7); color: #fff; background: rgba(255,255,255,0.08); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,0.18); }
.btn-block { width: 100%; }

/* ===== 通用 Section ===== */
.section { padding: 110px 0; }
.section-gray { background: var(--bg-gray); }

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  text-align: center;
}

.section-title {
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  margin-bottom: 20px;
}

.section-desc {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text-2);
  line-height: 1.8;
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.sub-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 80px 0 40px;
}

/* ===== 数据带 ===== */
.stats { padding: 72px 0; background: var(--bg); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-number {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-label { font-size: 14px; color: var(--text-2); margin-top: 8px; }

/* ===== 环境图片墙 ===== */
/* 图片容器统一用 padding 比例法（兼容老版手机浏览器，不依赖 aspect-ratio） */
.img-ratio { position: relative; overflow: hidden; }
.img-ratio::before { content: ""; display: block; }
.img-ratio > img {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.env-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.env-grid .env-item {
  border-radius: var(--radius);
  background: #e8e8ed;
}
.env-item::before { padding-top: 75%; } /* 4:3 */
.env-grid .env-item:first-child { grid-column: span 2; grid-row: span 2; }
.env-grid .env-item:first-child::before { display: none; } /* 高度由 grid 行撑开 */
.env-item:hover img { transform: scale(1.05); }
.env-item .img-caption {
  position: absolute;
  left: 14px; bottom: 12px;
  z-index: 2;
  font-size: 12px;
  color: #fff;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  padding: 4px 12px;
  border-radius: 999px;
}

/* ===== 基地卡片 ===== */
.factory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.factory-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s, box-shadow 0.35s;
}
.factory-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.factory-card .fc-img { background: #e8e8ed; }
.fc-img::before { padding-top: 62.5%; } /* 16:10 */
.factory-card:hover .fc-img img { transform: scale(1.04); }
.factory-card .fc-body { padding: 28px; }
.factory-card h4 { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.factory-card p { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-bottom: 14px; }
.fc-meta { display: flex; flex-direction: column; gap: 6px; }
.fc-meta span { font-size: 13px; color: var(--text-2); }
.fc-meta b { color: var(--text); font-weight: 600; margin-right: 6px; }

/* ===== 服务步骤 ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.step-card {
  background: var(--bg-gray);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  transition: transform 0.35s, box-shadow 0.35s;
}
.section-gray .step-card { background: #fff; box-shadow: var(--shadow); }
.step-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,0.08); }
.step-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.step-card h4 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.step-tagline { font-size: 14px; color: var(--accent); font-weight: 500; margin-bottom: 14px; }
.step-card p { font-size: 15px; color: var(--text-2); line-height: 1.8; }

/* ===== 车间横排图 ===== */
.workshop-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.workshop-strip .ws-item {
  border-radius: var(--radius);
  background: #e8e8ed;
}
.ws-item::before { padding-top: 100%; } /* 1:1 */
.ws-item:hover img { transform: scale(1.06); }
.ws-item .img-caption {
  position: absolute; left: 12px; bottom: 10px;
  z-index: 2;
  font-size: 12px; color: #fff;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(6px);
  padding: 3px 10px; border-radius: 999px;
}

/* ===== 产品系列 ===== */
.series-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}
.series-tab {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all 0.25s;
}
.series-tab .tab-count { font-size: 12px; color: var(--text-2); margin-left: 6px; }
.series-tab:hover { transform: translateY(-2px); }
.series-tab.active { background: var(--text); color: #fff; }
.series-tab.active .tab-count { color: rgba(255,255,255,0.6); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s, box-shadow 0.35s;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(0,0,0,0.1); }
.product-card .pc-img { background: #f0f0f2; }
.pc-img::before { padding-top: 115%; } /* 1:1.15 */
.product-card:hover .pc-img img { transform: scale(1.05); }
.product-card .pc-title {
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  color: var(--text);
}
.product-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-2);
  font-size: 15px;
  padding: 60px 0;
}

/* ===== 品牌墙 ===== */
.brand-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.brand-item {
  background: var(--bg-gray);
  border-radius: var(--radius);
  transition: transform 0.3s, background 0.3s;
}
.brand-item::before { padding-top: 56.25%; } /* 16:9 */
.brand-item img {
  object-fit: contain !important;
  padding: 24px;
  filter: grayscale(1) opacity(0.75);
  transition: filter 0.3s, transform 0.3s;
}
.brand-item:hover { transform: translateY(-3px); }
.brand-item:hover img { filter: none; transform: scale(1.05); }

.partner-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 56px;
}
.partner-cloud span {
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  transition: all 0.2s;
}
.partner-cloud span:hover { color: var(--accent); border-color: var(--accent); }

.cert-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.cert-badge {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--bg-gray);
  border-radius: 12px;
  padding: 14px 22px;
  transition: transform 0.25s;
}
.cert-badge:hover { transform: translateY(-2px); }

/* ===== 时间线 ===== */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 90px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 48px;
  padding: 28px 0;
}
.tl-year {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  line-height: 1.3;
}
.tl-body { position: relative; }
.tl-body::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 10px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-gray);
}
.tl-body h4 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.tl-body p { font-size: 14.5px; color: var(--text-2); line-height: 1.75; }
.tl-body img {
  margin-top: 16px;
  border-radius: var(--radius);
  max-height: 260px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.tl-body img:hover { transform: scale(1.01); }

/* ===== 联系我们 ===== */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
.contact-info .eyebrow,
.contact-info .section-title,
.contact-info .section-desc { text-align: left; margin-left: 0; }
.contact-info .section-desc { margin-bottom: 32px; }

.contact-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; }
.contact-list .ci-label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  width: 64px;
  padding-top: 2px;
}
.contact-list a { color: var(--accent); }
.contact-list a:hover { text-decoration: underline; }

.contact-form {
  background: var(--bg-gray);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}
.form-tip { font-size: 13.5px; margin-top: 14px; text-align: center; min-height: 20px; }
.form-tip.ok { color: #248a3d; }
.form-tip.err { color: #d70015; }

/* ===== 页脚 ===== */
#footer {
  background: var(--bg-gray);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-2);
}
.footer-inner .f-brand { font-weight: 600; color: var(--text); }

/* ===== 滚动入场动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

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

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .section { padding: 72px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 16px; }
  .env-grid { grid-template-columns: repeat(2, 1fr); }
  .env-grid .env-item:first-child { grid-column: span 2; grid-row: auto; }
  .env-grid .env-item:first-child::before { display: block; padding-top: 56.25%; }
  .factory-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .steps-grid { grid-template-columns: 1fr; }
  .workshop-strip { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-wall { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; gap: 48px; }
  .timeline::before { left: 62px; }
  .tl-item { grid-template-columns: 52px 1fr; gap: 28px; }
  .tl-year { font-size: 17px; }
  .tl-body::before { left: -24px; }

  .nav-links {
    position: absolute;
    top: 56px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a { padding: 14px 24px; font-size: 15px; }
  .menu-toggle { display: flex; }
}
