/* ═══════════════════════════════════════════════════════════════
   桌面本地存档 · 开屏
   仅在 file:// 打开 index.html 时出现；线上完全隐藏。
   ═══════════════════════════════════════════════════════════════ */

.offline-cover {
  display: none;
}

html.offline-preview body {
  background: #071019;
}

html.offline-preview body > :not(.offline-cover) {
  display: none !important;
}

html.offline-preview .offline-cover {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background-color: #071019;
  background-image: url("../assets/background/page-bg.jpg");
  background-position: center 24%;
  background-size: cover;
  background-repeat: no-repeat;
  color: #f1eadc;
}

.offline-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 8, 13, 0.96) 0%, rgba(4, 8, 13, 0.82) 42%, rgba(4, 8, 13, 0.3) 100%),
    linear-gradient(180deg, rgba(4, 8, 13, 0.35) 0%, rgba(4, 8, 13, 0.18) 48%, rgba(4, 8, 13, 0.84) 100%);
}

.offline-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(90% 65% at 78% 32%, rgba(169, 201, 234, 0) 0%, rgba(4, 8, 13, 0.36) 100%),
    linear-gradient(115deg, rgba(4, 8, 13, 0.12) 0%, rgba(4, 8, 13, 0.44) 100%);
  mix-blend-mode: multiply;
}

.offline-cover__inner {
  display: flex;
  flex-direction: column;
  width: min(calc(100% - 2 * clamp(22px, 5.2vw, 76px)), 1240px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding-block: clamp(22px, 3.4vw, 40px) clamp(18px, 3vw, 30px);
}

.offline-cover__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.offline-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
}

.offline-brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(241, 234, 220, 0.24);
  border-radius: 50%;
  background: rgba(8, 14, 22, 0.42);
}

.offline-brand__mark img {
  width: 25px;
  height: 25px;
}

.offline-brand__text {
  display: grid;
  gap: 1px;
}

.offline-brand__text strong {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.offline-brand__text small {
  color: rgba(241, 234, 220, 0.54);
  font-family: var(--font-sans);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.offline-cover__mode {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  color: rgba(241, 234, 220, 0.56);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.offline-cover__mode::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b8d4ee;
  box-shadow: 0 0 0 3px rgba(184, 212, 238, 0.12);
}

.offline-cover__main {
  width: min(100%, 700px);
  margin-block: auto;
  padding-block: clamp(52px, 10vh, 120px) clamp(38px, 7vh, 88px);
}

.offline-cover__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(241, 234, 220, 0.58);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.offline-cover__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(241, 234, 220, 0.45);
}

.offline-cover__title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 4.9rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 12px 36px rgba(2, 5, 9, 0.35);
}

.offline-cover__lead {
  max-width: 33em;
  margin-top: clamp(16px, 2.2vw, 24px);
  color: rgba(241, 234, 220, 0.76);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  line-height: 1.9;
}

.offline-cover__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: clamp(24px, 3.2vw, 36px);
}

.offline-cover__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 16px;
  padding: 12px 20px;
  border: 1px solid rgba(255, 250, 242, 0.9);
  border-radius: 999px;
  background: #f4ede0;
  color: #11161d;
  font-size: var(--text-sm);
  line-height: 1;
  transition:
    background-color 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    transform 180ms var(--ease-out);
}

.offline-cover__button:hover {
  border-color: #fffaf2;
  background: #fffaf2;
  transform: translateY(-1px);
}

.offline-cover__button:focus-visible {
  outline: 2px solid #cfe3f7;
  outline-offset: 4px;
}

.offline-cover__button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.offline-cover__hint {
  color: rgba(241, 234, 220, 0.5);
  font-size: 10px;
  line-height: 1.7;
}

.offline-cover__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(241, 234, 220, 0.16);
  color: rgba(241, 234, 220, 0.42);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.offline-cover__foot a {
  color: rgba(241, 234, 220, 0.62);
  transition: color 180ms var(--ease-out);
}

.offline-cover__foot a:hover {
  color: #fffaf2;
}

.offline-cover__top,
.offline-cover__main,
.offline-cover__foot {
  animation: offline-rise 520ms var(--ease-out) both;
}

.offline-cover__main {
  animation-delay: 60ms;
}

.offline-cover__foot {
  animation-delay: 120ms;
}

@keyframes offline-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .offline-cover__mode {
    display: none;
  }

  .offline-brand__text strong {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .offline-cover {
    background-position: center top;
    background-attachment: scroll;
  }

  .offline-cover::before {
    background:
      linear-gradient(180deg, rgba(4, 8, 13, 0.58) 0%, rgba(4, 8, 13, 0.5) 34%, rgba(4, 8, 13, 0.94) 100%),
      linear-gradient(90deg, rgba(4, 8, 13, 0.4) 0%, rgba(4, 8, 13, 0.08) 100%);
  }

  .offline-cover__inner {
    padding-block: 20px 18px;
  }

  .offline-cover__top {
    gap: 12px;
  }

  .offline-cover__mode {
    max-width: 9em;
    text-align: right;
    line-height: 1.7;
  }

  .offline-cover__main {
    padding-block: clamp(64px, 15vh, 130px) clamp(34px, 8vh, 60px);
  }

  .offline-cover__title {
    max-width: 9em;
    font-size: clamp(2.5rem, 10.5vw, 3.7rem);
    line-height: 1.18;
  }

  .offline-cover__lead {
    max-width: 24em;
    font-size: 0.92rem;
    line-height: 1.85;
  }

  .offline-cover__actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .offline-cover__button {
    width: 100%;
  }

  .offline-cover__foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .offline-cover__top,
  .offline-cover__main,
  .offline-cover__foot {
    animation: none;
  }

  .offline-cover__button {
    transition: none;
  }
}
