/* ============================================================
   深空进化 — landing
   全视口单屏 · 结构网格 · 玻璃主卡 · 背景视频
   ============================================================ */

/* ---------- 令牌 ---------- */
:root {
  --font-sans: "Inter", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", monospace;

  --bg: #000000;
  --grid: rgba(255, 255, 255, 0.22);
  --text: #e8e8e8;
  --nav: #b6b6b6;
  --muted: #7a7a7a;
  --gold: #e4d08a;
  --blue-1: #1a6fff;
  --blue-2: #0046f0;
  --blue-3: #002fd4;
  --glass: rgba(10, 10, 12, 0.42);

  --line-left: 5.371%;
  --line-c1: 33.203%;
  --line-c2: 66.797%;
  --line-right: 95.02%;

  --header-h: 8.286vh;
  --band-h: calc(21.286vh - 20px);
  --card-h: calc(46.857vh + 7px);
  --card-line: calc(46.857vh + 7px);

  --row-header: var(--header-h);
  --row-band: calc(var(--band-h) - var(--header-h));
  --row-card: calc(var(--card-h) - var(--band-h));

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 高度档位 */
@media (min-width: 861px) and (max-height: 1199px) {
  :root { --card-h: calc(46.857vh + 27px); --card-line: calc(46.857vh + 27px); }
}
@media (min-height: 1200px) {
  :root {
    --band-h: calc(21.286vh - 48px);
    --card-h: calc(51vh + 8px);
    --card-line: calc(51vh + 8px);
  }
}
@media (min-height: 1440px) {
  :root { --band-h: 16.8vh; --card-h: 55vh; --card-line: 55vh; }
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.menu-open { overflow: hidden; }

@media (max-height: 800px), (max-width: 860px) {
  body { overflow: auto; }
}

/* ---------- 背景视频 ---------- */
.bg-media {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
  overflow: hidden;
  pointer-events: none;
  animation: fade-in 1.5s ease both;
}
.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 103%;
  height: 103%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: translate(-50%, -50%) translateX(-1.65%);
}
@media (min-height: 1200px) { .bg-video { width: 101.5%; height: 101.5%; } }
@media (min-height: 1440px) { .bg-video { width: 101%; height: 101%; } }
@media (max-width: 860px) {
  .bg-video {
    width: 100%;
    height: 100%;
    object-position: 51.5% 50%;
    transform: translate(-50%, -50%);
  }
}

/* ---------- 结构网格 ---------- */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}
.g-line { position: absolute; background: var(--grid); }

.g-line.fade-v {
  top: 0;
  bottom: 0;
  width: 1px;
  transform-origin: top center;
  animation: draw-y 1.05s var(--ease) both;
}

.v-left  { left: var(--line-left);  animation-delay: 0.12s; }
.v-c1    { left: var(--line-c1);    animation-delay: 0.22s; }
.v-c2    { left: var(--line-c2);    animation-delay: 0.30s; }
.v-right { left: var(--line-right); animation-delay: 0.38s; }

.v-c1, .v-c2 {
  background: linear-gradient(to bottom,
    var(--grid) 0,
    var(--grid) var(--card-line),
    transparent 100%);
}

.g-line.fade-h {
  left: var(--line-left);
  right: calc(100% - var(--line-right));
  height: 1px;
  transform-origin: left center;
  animation: draw-x 1.05s var(--ease) both;
}
.h-header { top: var(--header-h); animation-delay: 0.18s; }
.h-band   { top: var(--band-h);   animation-delay: 0.32s; }
.h-card   { top: var(--card-h);   animation-delay: 0.46s; }

/* ---------- 主布局 ---------- */
.layout {
  position: relative;
  z-index: 10;
  height: 100dvh;
  display: grid;
  grid-template-columns:
    var(--line-left)
    27.832%
    33.594%
    28.223%
    calc(100% - var(--line-right));
  grid-template-rows: var(--row-header) var(--row-band) var(--row-card) 1fr auto;
}

/* 灰度带：只在卡片行，把视频灰度化 */
.card-desat {
  grid-area: 3 / 1 / 4 / 6;
  backdrop-filter: grayscale(1);
  -webkit-backdrop-filter: grayscale(1);
  pointer-events: none;
}

/* ---------- 头部 ---------- */
.header-bar {
  grid-area: 1 / 2 / 2 / 6;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  animation: fade-down 0.7s var(--ease) both;
  animation-delay: 0.12s;
}

.brand {
  grid-area: 1 / 2 / 2 / 3;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 0.62rem;
  padding-left: 0.85rem;
  text-decoration: none;
}
.brand-mark { display: block; flex: none; }
.brand-word {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(15px, 1.55vw, 18px);
  letter-spacing: 0.02em;
  color: #949493;
  white-space: nowrap;
}

.nav {
  grid-area: 1 / 3 / 2 / 4;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.4rem;
}
.nav-link {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(13px, 1.38vw, 16px);
  color: var(--nav);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link:hover { color: #fff; }

.header-cta {
  grid-area: 1 / 4 / 2 / 5;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ---------- 按钮（双层框） ---------- */
.btn-frame {
  display: inline-flex;
  background: #050505;
  border: 3px solid #2a2a2a;
  padding: 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 400;
  color: #f4f7ff;
  letter-spacing: 0.04em;
  border: 1px solid #0d1220;
  background: linear-gradient(180deg, #0170c4 0%, #0058b8 18%, #0039c4 55%, #0018ae 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.25s ease, transform 0.25s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

.btn-frame-sm { padding: 3px; border-width: 2px; }
.btn-sm {
  height: clamp(32px, 4.8vh, 38px);
  min-width: 8rem;
  padding: 0 1rem;
  font-size: clamp(12px, 1.15vw, 14px);
}
.btn-frame-lg { padding: 4px; border-width: 3px; }
.btn-lg {
  height: clamp(42px, 6.6vh, 50px);
  min-width: 10rem;
  padding: 0 1.4rem;
  font-size: clamp(14px, 1.4vw, 17px);
}

/* ---------- 汉堡 ---------- */
.burger {
  display: none;
  position: fixed;
  top: calc(var(--header-h) / 2 - 22px);
  right: 12px;
  z-index: 50;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.burger-bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: width 0.25s ease, transform 0.3s var(--ease), opacity 0.2s ease;
}
.burger:hover .burger-bar:first-child,
.burger:hover .burger-bar:last-child { width: 16px; }
.burger[aria-expanded="true"] .burger-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-bar:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- 玻璃主卡 ---------- */
.glass-card {
  grid-area: 3 / 3 / 4 / 4;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(2.75rem, 6.4vh, 5.5rem);
  margin: 0;
  padding: 1.5rem 34px;
  background: linear-gradient(90deg,
    rgba(48, 48, 52, 0.28) 0%,
    rgba(78, 78, 84, 0.16) 55%,
    rgba(110, 110, 118, 0.10) 100%);
  backdrop-filter: grayscale(1) blur(28px);
  -webkit-backdrop-filter: grayscale(1) blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  overflow: hidden;
  container-type: inline-size;
}
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(18, 18, 20, 0.16) 0%,
    rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}
.card-top, .card-bottom {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.card-top { justify-content: flex-start; }

.plus {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  line-height: 1;
  color: #fff;
}
.card-divider {
  flex: none;
  width: 1px;
  height: 17px;
  background: rgba(255, 255, 255, 0.22);
}
.card-title {
  margin: 0;
  min-width: 0;
  font-family: var(--font-mono);
  font-weight: 400;
  color: #f4f4f4;
  font-size: clamp(13px, 4.15cqw, 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.send-btn { margin-left: auto; }

.icon-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 8, 0.55);
  border: 1px solid rgba(210, 210, 210, 0.38);
  color: #e6e6e6;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.06);
}
.link-btn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffffc7;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(12px, 1.05vw, 15px);
  color: #d0d0d0;
  white-space: nowrap;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.pill:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.09);
}
.pill em {
  font-style: normal;
  font-weight: 500;
  color: var(--gold);
}

/* 大屏放大 */
@media (min-width: 1440px) and (min-height: 1051px) {
  .card-title { font-size: clamp(13px, 5.3cqw, 26px); }
  .icon-btn { width: 44px; height: 44px; }
  .pill { font-size: 18px; padding: 0.68rem 1.2rem; }
}

/* ---------- 卡片下方居中大字 ---------- */
.center-word {
  grid-area: 4 / 3 / 5 / 4;
  margin: 0;
  padding-top: min(145px, 16vh);
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(14px, 1.55vw, 20px);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  word-spacing: 0.42em;
  text-indent: 0.42em;
  color: #d4d0cc;
}
@media (min-width: 861px) and (max-height: 1199px) {
  .center-word { font-size: 14px; }
}

/* ---------- 左下：标题 + 按钮 ---------- */
.hero-copy {
  grid-area: 5 / 2 / 6 / 3;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.95rem;
  padding: 0 0.4rem 5.4vh 1.55rem;
}
.hero-h1 {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  color: #ececec;
  line-height: 1.12;
  white-space: nowrap;
  font-size: clamp(22px, calc(100cqw / 9.05), 56px);
}

/* ---------- 右下：说明 ---------- */
.hero-desc {
  grid-area: 5 / 4 / 6 / 5;
  margin: 0;
  padding: 0 20px calc(5.4vh + 20px) 0.7rem;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(13px, 1.45vw, 18px);
  line-height: 1.45;
  color: #8d8d8d;
}

/* ---------- 移动菜单 ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.15rem;
  padding: 80px 24px 24px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  opacity: 0;
  transform: translate3d(0, -18px, 0);
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.5s var(--ease), clip-path 0.55s var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open {
  opacity: 1;
  transform: none;
  clip-path: inset(0);
  pointer-events: auto;
}
.mobile-link {
  font-family: var(--font-mono);
  font-size: clamp(18px, 5vw, 22px);
  color: #d8d8d8;
  text-decoration: none;
  opacity: 0;
}
.mobile-cta { opacity: 0; margin-top: 0.4rem; }
.mobile-menu.is-open .mobile-link,
.mobile-menu.is-open .mobile-cta {
  animation: rise-in 0.55s var(--ease) both;
  animation-delay: var(--d, 0s);
}

/* ---------- 动效 ---------- */
.fade-in   { animation: fade-in 1s var(--ease) both;     animation-delay: var(--d, 0s); }
.fade-down { animation: fade-down 0.7s var(--ease) both; animation-delay: var(--d, 0s); }
.rise-in   { animation: rise-in 0.9s var(--ease) both;   animation-delay: var(--d, 0s); }

@keyframes fade-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes rise-in   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes draw-y    { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes draw-x    { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .header-cta .btn-frame { display: none; }
  .burger { display: flex; }
}

@media (max-width: 860px) {
  .v-c1, .v-c2 { display: none; }
  .v-left  { left: 20px; }
  .v-right { left: calc(100% - 20px); }
  .h-header, .h-band, .h-card { left: 20px; right: 20px; }

  .layout {
    height: auto;
    min-height: 100dvh;
    grid-template-columns: 20px 1fr 20px;
    grid-template-rows: var(--header-h) 6vh auto auto auto auto auto;
  }

  .header-bar { grid-area: 1 / 1 / 2 / 4; }
  .brand { grid-area: 1 / 2 / 2 / 3; padding-left: 0; }
  .header-cta { grid-area: 1 / 3 / 2 / 4; }

  .card-desat { grid-area: 3 / 1 / 4 / 4; }
  .glass-card {
    grid-area: 3 / 2 / 4 / 3;
    margin: 0 0 1.5rem;
    padding: 1.25rem 20px;
    gap: 2.5rem;
  }
  .card-title { font-size: 15px; }

  .center-word {
    grid-area: 4 / 2 / 5 / 3;
    padding-top: 2.2rem;
    font-size: 13px;
  }

  .hero-copy { display: contents; }
  .hero-h1 {
    grid-area: 5 / 2 / 6 / 3;
    font-size: clamp(26px, 8vw, 36px);
    white-space: normal;
  }
  .hero-desc {
    grid-area: 6 / 2 / 7 / 3;
    padding: 1.1rem 0 0;
    font-size: 14px;
  }
  .hero-copy .btn-frame {
    grid-area: 7 / 2 / 8 / 3;
    margin: 1.2rem 0 2.4rem;
  }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  .bg-media, .header-bar,
  .fade-in, .fade-down, .rise-in,
  .g-line.fade-v, .g-line.fade-h {
    animation: none !important;
    opacity: 1 !important;
  }
  .g-line.fade-v { transform: scaleY(1) !important; }
  .g-line.fade-h { transform: scaleX(1) !important; }
  .fade-in, .fade-down, .rise-in { transform: none !important; }

  .mobile-menu, .mobile-menu.is-open,
  .mobile-menu .mobile-link, .mobile-menu .mobile-cta {
    animation: none !important;
    transition: none !important;
  }
  .mobile-link, .mobile-cta { opacity: 1 !important; transform: none !important; }

  .btn:hover, .icon-btn:hover, .pill:hover, .nav-link:hover,
  .burger-bar { transition: none !important; }
  .btn:hover, .icon-btn:hover { transform: none !important; }
}
