:root {
  --bg: #07080a;
  --fg: #ecebe6;
  --muted: #8d8d93;
  --dim: #5c5c63;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  --gold: #c9a96e;
  --gold-2: #e8d3a6;
  --green: #5fd38d;
  --red: #e07a6a;
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Source Han Sans SC",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(201, 169, 110, 0.35); }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; }
.orb-a {
  width: 70vw; height: 70vw; left: -20vw; top: -35vw;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.22), transparent 62%);
  animation: drift 28s ease-in-out infinite alternate;
}
.orb-b {
  width: 60vw; height: 60vw; right: -22vw; bottom: -30vw;
  background: radial-gradient(circle, rgba(88, 108, 158, 0.2), transparent 62%);
  animation: drift 34s ease-in-out infinite alternate-reverse;
}
@keyframes drift { to { transform: translate(6vw, 4vw) scale(1.12); } }
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 25%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 25%, #000 25%, transparent 78%);
  opacity: 0.55;
}
.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.045;
  mix-blend-mode: overlay;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 64px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 28px; height: 28px; color: var(--gold); }
.brand-cn { font-size: 16px; font-weight: 600; letter-spacing: 0.14em; }
.brand-en {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.32em; color: var(--muted);
  padding-left: 12px; border-left: 1px solid var(--line-2);
}
.meta {
  display: flex; align-items: center; gap: 24px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted);
}
.status { display: flex; align-items: center; gap: 8px; font-family: var(--font); letter-spacing: 0.1em; }
.status i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(95, 211, 141, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(95, 211, 141, 0); }
  100% { box-shadow: 0 0 0 0 rgba(95, 211, 141, 0); }
}

/* ---------- Hero ---------- */
main { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.hero { padding: clamp(40px, 9vh, 110px) 0 clamp(40px, 7vh, 76px); text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.42em; color: var(--gold);
}
.eyebrow::before, .eyebrow::after {
  content: ""; width: 32px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.eyebrow::after { transform: scaleX(-1); }
h1 {
  margin-top: 26px;
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.1;
  padding-left: 0.12em;
  background: linear-gradient(180deg, #ffffff 25%, rgba(255, 255, 255, 0.5));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle {
  margin-top: 18px;
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 300;
  letter-spacing: 0.5em;
  padding-left: 0.5em;
  color: var(--gold-2);
}
.lead { margin-top: 22px; font-size: 14px; letter-spacing: 0.12em; color: var(--muted); }

/* ---------- Cards ---------- */
.systems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
  padding-bottom: 88px;
}
.card {
  --mx: 50%; --my: 0%;
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 380px;
  padding: 34px 34px 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform 0.6s var(--ease), border-color 0.4s, box-shadow 0.6s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(460px circle at var(--mx) var(--my), rgba(201, 169, 110, 0.13), transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(232, 211, 166, 0.75), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity 0.4s;
}
.card:hover, .card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--line-2);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(201, 169, 110, 0.04);
  outline: none;
}
.card:hover::before, .card:hover::after,
.card:focus-visible::before, .card:focus-visible::after { opacity: 1; }

.card-head { display: flex; align-items: center; justify-content: space-between; }
.no { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.24em; color: var(--dim); }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 11.5px; letter-spacing: 0.14em;
  color: var(--muted); border: 1px solid var(--line-2);
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.online { color: var(--green); border-color: rgba(95, 211, 141, 0.28); }
.badge.building { color: var(--gold); border-color: rgba(201, 169, 110, 0.28); }
.badge.maintenance { color: var(--red); border-color: rgba(224, 122, 106, 0.28); }

.icon {
  margin-top: 38px; width: 58px; height: 58px; border-radius: 17px;
  display: grid; place-items: center;
  color: var(--gold-2);
  background: linear-gradient(145deg, rgba(201, 169, 110, 0.2), rgba(201, 169, 110, 0.02));
  border: 1px solid rgba(201, 169, 110, 0.24);
  transition: transform 0.6s var(--ease);
}
.icon svg { width: 26px; height: 26px; }
.card:hover .icon { transform: rotate(-6deg) scale(1.05); }

.card h2 { margin-top: 28px; font-size: 26px; font-weight: 600; letter-spacing: 0.1em; }
.en { margin-top: 9px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--dim); }
.desc { margin-top: 18px; font-size: 14px; line-height: 1.85; color: var(--muted); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li {
  padding: 4px 11px; border-radius: 8px;
  font-size: 12px; letter-spacing: 0.06em; color: var(--muted);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}

.card-foot {
  margin-top: auto; padding-top: 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 22px 0 24px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.14em;
  color: #0b0b0c; background: var(--fg);
  transition: background 0.35s, box-shadow 0.35s, gap 0.35s var(--ease);
}
.btn svg { width: 16px; height: 16px; transition: transform 0.4s var(--ease); }
.card:hover .btn { background: var(--gold-2); box-shadow: 0 10px 30px -8px rgba(201, 169, 110, 0.55); }
.card:hover .btn svg { transform: translateX(4px); }
.path { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: 0.06em; }

/* ---------- Footer ---------- */
footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 26px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: 0.1em; color: var(--dim);
}
.foot-meta { font-family: var(--mono); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 36px; z-index: 10;
  transform: translate(-50%, 20px);
  padding: 13px 22px; border-radius: 999px;
  font-size: 13.5px; letter-spacing: 0.08em;
  color: var(--fg);
  background: rgba(22, 23, 27, 0.85);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s, transform 0.5s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); animation: rise 1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .brand-en, #clock { display: none; }
  .card { padding: 28px 24px 24px; min-height: 0; }
  .subtitle { letter-spacing: 0.3em; padding-left: 0.3em; }
}
