/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #000000;
  --text: #ffffff;
  --text-dim: rgba(255,255,255,0.62);
  --text-dimmer: rgba(255,255,255,0.42);
  --line: rgba(255,255,255,0.14);
  --line-strong: rgba(255,255,255,0.26);
  --fill-solid: rgba(255,255,255,0.10);
  --gutter: clamp(20px, 5vw, 100px);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Microsoft YaHei", "微软雅黑", system-ui, sans-serif;
  --font-mono: "Microsoft YaHei", "微软雅黑", system-ui, sans-serif;
}

html, body { height: 100%; }
body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
button { font: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* ===== Hero shell ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  isolation: isolate;
}

.hero__media {
  position: absolute; inset: 0; z-index: -1;
  background: #000;
}
.hero__media video {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

.hero__scrim {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 520px at 50% 50%,
      rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.28) 55%, transparent 80%),
    linear-gradient(to bottom,
      rgba(0,0,0,0.5) 0%, transparent 20%,
      transparent 80%, rgba(0,0,0,0.55) 100%);
}

/* ===== Navbar ===== */
.nav {
  position: relative; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  padding: clamp(20px, 2.4vw, 34px) var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  padding-top: max(clamp(20px, 2.4vw, 34px), env(safe-area-inset-top));
}
.nav__logo {
  font-weight: 700;
  font-size: clamp(20px, 1.75vw, 30px);
  letter-spacing: 0.16em;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
}

/* 北京时间 */
.clock {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 4px;
}
.clock-label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--text-dimmer);
}
.clock-time {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(15px, 1.1vw, 19px);
  letter-spacing: 0.08em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ===== Hero body / panel ===== */
.hero__body {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  min-height: 0;
  overflow-y: auto;
}
.panel {
  width: min(88vw, 460px);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.panel h1 {
  font-weight: 700;
  font-size: clamp(54px, 6.2vw, 118px);
  letter-spacing: 0.03em;
  line-height: 0.95;
}
.tagline {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(11px, 0.94vw, 17px);
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-top: clamp(14px, 1.4vw, 24px);
  line-height: 1.4;
}

/* Form */
.panel form {
  margin-top: clamp(38px, 4.6vw, 82px);
  display: flex; flex-direction: column;
  gap: clamp(14px, 1.3vw, 22px);
  width: 100%;
}
.field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 2px clamp(12px, 1.1vw, 18px);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(16px, 0.95vw, 18px);
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--text);
  outline: none;
  transition: border-color 0.25s ease;
}
.field input::placeholder {
  color: var(--text-dim);
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}
.field input:focus {
  border-bottom-color: rgba(255,255,255,0.85);
}
.field input:focus::placeholder { color: var(--text-dimmer); }
.field-msg {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #ff8fa0;
  min-height: 15px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.field-msg.show { opacity: 1; }

.btn {
  width: 100%;
  border: none;
  border-radius: 0;
  padding: clamp(17px, 1.6vw, 27px) 20px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(11px, 0.78vw, 14px);
  letter-spacing: 0.22em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn--solid {
  background: var(--fill-solid);
  color: var(--text);
}
.btn--solid:hover { background: rgba(255,255,255,0.17); }
.btn.loading { pointer-events: none; opacity: 0.55; }

/* Toast */
.toast {
  position: fixed; bottom: 30px; left: 50%; z-index: 100;
  transform: translateX(-50%) translateY(60px);
  padding: 12px 20px;
  background: rgba(10,10,12,0.92);
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
  opacity: 0; pointer-events: none;
  transition: all 0.35s var(--ease-premium);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== Focus ===== */
.btn:focus-visible,
.field input:focus-visible {
  outline: 1px solid rgba(255,255,255,0.7);
  outline-offset: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 380px) {
  .panel h1 { font-size: clamp(44px, 15vw, 64px); }
}

/* ===== Short-height compress ===== */
@media (max-height: 640px) {
  .hero { min-height: 100svh; }
  .nav { padding-top: 14px; padding-bottom: 14px; }
  .panel h1 {
    font-size: clamp(36px, 7vw, 64px);
  }
  .tagline { margin-top: 10px; }
  .panel form { margin-top: 24px; gap: 12px; }
  .btn { padding: 14px 18px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .hero__media video { display: none; }
  .hero__media {
    background-image: url("bg.jpg");
    background-size: cover;
    background-position: center;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}