/* ============================================================
   大连四方无人机｜低空应用案例馆
   css/style.css — 首页深色版式（移动端优先）
   设计关键词：深色 · 高级 · 克制 · 工程科技感
   ============================================================ */

:root {
  --bg: #0a0b0d;
  --bg-soft: #101216;
  --bg-card: #14171c;
  --line: rgba(255, 255, 255, .08);
  --text: #f2f4f8;
  --text-2: #9aa3b2;
  --text-3: #5d6673;
  --accent: #3d7bff;
  --radius: 18px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
               "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

.wrap { width: min(1060px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: 76px 0; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top));
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: rgba(10, 11, 13, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.topbar-brand {
  display: flex; align-items: center; gap: 9px;
  font-size: .95rem; font-weight: 600; color: var(--text);
}
.topbar-logo { color: var(--accent); flex: none; }
.topbar-cta {
  font-size: .82rem; font-weight: 500;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, .04);
  transition: background .25s var(--ease);
}
.topbar-cta:active { background: rgba(255, 255, 255, .12); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh; /* 兼容不支持 svh 的老内核 */
  display: flex; align-items: flex-end;
  overflow: hidden;
  /* 基础底色：WebGL 海面不可用时的兜底（js 会再叠加静态背景图） */
  background: linear-gradient(165deg, #10141d 0%, #0a0b0d 55%, #07080a 100%);
}
/* WebGL 海面画布 */
.hero-ocean {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: linear-gradient(160deg, #0d1524, #05070c);
}
.hero-mask {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,6,8,.55) 0%, rgba(5,6,8,.15) 38%, rgba(10,11,13,.55) 72%, var(--bg) 100%);
}
.hero-body {
  position: relative; z-index: 2;
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 120px;
}
.hero-eyebrow {
  font-size: .78rem; letter-spacing: .38em;
  color: var(--text-2);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.3rem, 9vw, 4.6rem);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.18;
  margin-bottom: 12px;
}
.hero-slogan {
  font-size: clamp(1.15rem, 4.6vw, 1.7rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 22px;
}
.hero-domains {
  font-size: .92rem;
  color: var(--text-2);
  letter-spacing: .08em;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  max-width: 420px;
}
.hero-scroll {
  position: absolute; z-index: 2;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  width: 22px; height: 36px;
  border: 1.5px solid rgba(255, 255, 255, .28);
  border-radius: 12px;
  display: flex; justify-content: center;
  padding-top: 7px;
}
.hero-scroll span {
  width: 3px; height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .55);
  animation: drop 1.8s var(--ease) infinite;
}
@keyframes drop {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- 区块通用 ---------- */
.eyebrow {
  font-size: .74rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.sec-head { margin-bottom: 44px; }
.sec-head h2 {
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: .01em;
  margin-bottom: 10px;
}
.sec-desc { color: var(--text-2); font-size: .98rem; max-width: 560px; }

/* ---------- 六大应用卡片 ---------- */
.apps { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.apps-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.app-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, #1a2130, #0c0f15);
  isolation: isolate;
}
.app-card video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.92);
  transition: transform .6s var(--ease);
}
.app-card:hover video { transform: scale(1.04); }
.app-card::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(5,6,8,.05) 40%, rgba(5,6,8,.78) 100%);
}
.app-card figcaption {
  position: absolute; z-index: 2;
  left: 18px; right: 18px; bottom: 16px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.app-card strong { font-size: 1.12rem; font-weight: 650; }
.app-card span {
  font-size: .68rem; letter-spacing: .22em;
  color: var(--text-2); text-transform: uppercase;
  white-space: nowrap;
}
/* 视频缺失 / 未加载时露出渐变底 */
video.video-missing { visibility: hidden; }

/* ---------- REAL PROJECTS ---------- */
.proj-list { display: grid; gap: 34px; }

/* 实战数据条 */
.proj-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin-bottom: 44px;
}
.ps-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 2px;
}
.ps-item strong {
  font-size: 1.45rem; font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.ps-item span { font-size: .76rem; color: var(--text-2); }

/* 更多落地项目标签墙 */
.more-projects { margin-top: 54px; }
.mp-title {
  font-size: .78rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 16px;
}
.chip-wall { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: .85rem;
  color: var(--text-2);
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: 999px;
  padding: 8px 18px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.proj-media {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, #1a2130, #0c0f15);
}
.proj-media video { width: 100%; height: 100%; object-fit: cover; }
.proj-info { padding: 18px 4px 0; }
.proj-tag {
  display: inline-block;
  font-size: .74rem; font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 13px;
  margin-bottom: 10px;
}
.proj-info h3 { font-size: 1.25rem; font-weight: 650; margin-bottom: 6px; }
.proj-info p { color: var(--text-2); font-size: .94rem; max-width: 640px; }

/* ---------- ABOUT ---------- */
.about { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.about-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
}
.about-num {
  font-size: .78rem;
  letter-spacing: .26em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.about-item h3 { font-size: 1.18rem; font-weight: 650; margin: 8px 0 6px; }
.about-item p { color: var(--text-2); font-size: .93rem; }

/* ---------- 联系 ---------- */
.contact-wrap { text-align: center; }
.contact-wrap .sec-desc { margin: 0 auto 30px; }
.contact-actions { display: grid; gap: 14px; justify-items: center; }
.btn-main {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 1.02rem; font-weight: 600;
  border-radius: 999px;
  padding: 15px 42px;
  box-shadow: 0 10px 34px rgba(61, 123, 255, .32);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease);
}
.btn-main:active { transform: scale(.97); filter: brightness(1.1); }
.contact-note { font-size: .82rem; color: var(--text-3); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 calc(34px + env(safe-area-inset-bottom));
  color: var(--text-2);
  font-size: .84rem;
  text-align: center;
}
.footer-sub { color: var(--text-3); font-size: .74rem; letter-spacing: .14em; margin-top: 4px; }

/* ---------- 滚动进场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 平板 ---------- */
@media (min-width: 640px) {
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: repeat(3, 1fr); }
  .proj-list { gap: 54px; }
  .proj { display: grid; grid-template-columns: 7fr 5fr; gap: 26px; align-items: center; }
  .proj:nth-child(even) .proj-media { order: 2; }
  .proj-info { padding: 0; }
  .proj-stats { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 桌面 ---------- */
@media (min-width: 960px) {
  .section { padding: 110px 0; }
  .apps-grid { grid-template-columns: repeat(3, 1fr); }
  .app-card { aspect-ratio: 3 / 4; }
  .hero-domains { font-size: 1rem; }
}
