/* ==========================================================================
   cover.css — 一级页（首屏视觉展示）
   ========================================================================== */

.cover-body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.cover {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(18px, 2.6vw, 34px) var(--pad) clamp(16px, 2.4vw, 30px);
  isolation: isolate;
  transition: opacity 620ms var(--ease), transform 1100ms var(--ease);
}

.cover.is-leaving {
  opacity: 0;
  transform: scale(1.02);
}

/* ---- scene layers ------------------------------------------------------- */

.cover__fallback,
.cover__scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 0;
}

.cover__fallback {
  background: var(--bg) url("../img/works/seaside-store.webp") center / cover no-repeat;
  opacity: 0.55;
  filter: saturate(0.85) brightness(0.7);
}

.cover__scene {
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  filter: brightness(0.82) saturate(0.94) contrast(1.02);
  transition: opacity 1200ms var(--ease);
}

.cover__scene.is-ready {
  opacity: 1;
}

.cover__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
      to top,
      rgba(8, 9, 11, 0.96) 0%,
      rgba(8, 9, 11, 0.82) 16%,
      rgba(8, 9, 11, 0.38) 40%,
      rgba(8, 9, 11, 0) 62%
    ),
    linear-gradient(to right, rgba(8, 9, 11, 0.72) 0%, rgba(8, 9, 11, 0.16) 34%, rgba(8, 9, 11, 0) 58%),
    linear-gradient(to bottom, rgba(8, 9, 11, 0.78) 0%, rgba(8, 9, 11, 0) 28%),
    radial-gradient(128% 92% at 52% 44%, rgba(8, 9, 11, 0) 38%, rgba(5, 6, 8, 0.62) 100%);
}

.cover__scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 11, 0.14);
}

.cover__grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.5;
  background-image: linear-gradient(to right, var(--line-faint) 1px, transparent 1px);
  background-size: 25% 100%;
  background-position: 1px 0;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

@media (max-width: 768px) {
  .cover__grid {
    background-size: 50% 100%;
  }
}

/* ---- chrome ------------------------------------------------------------- */

.cover__top,
.cover__bottom {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.cover__top {
  align-items: flex-start;
  padding-bottom: clamp(14px, 2vw, 22px);
  border-bottom: 1px solid var(--line-faint);
}

.cover__bottom {
  padding-top: clamp(14px, 2vw, 22px);
  border-top: 1px solid var(--line-faint);
  align-items: center;
}

.cover__id {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cover__name-sm {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  letter-spacing: 0.16em;
  color: var(--ink);
}

.cover__role-sm {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0.88;
}

.cover__top-meta {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: right;
  text-shadow: 0 1px 12px rgba(4, 5, 7, 0.7);
}

.cover__top-meta .cover__idx {
  color: var(--ink);
}

.cover__top-meta .cover__idx b {
  color: var(--accent);
  font-weight: 400;
}

/* ---- main composition --------------------------------------------------- */

.cover__main {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(20px, 3vw, 40px);
}

.cover__hero {
  min-width: 0;
}

.cover__eyebrow {
  margin-bottom: clamp(14px, 2vw, 26px);
  color: var(--ink-2);
}

.cover__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: var(--fs-cover);
  line-height: 0.94;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 0;
  text-shadow: 0 2px 60px rgba(0, 0, 0, 0.55);
}

.cover__sub {
  margin-top: clamp(16px, 2.2vw, 26px);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.1vw, 1.02rem);
  letter-spacing: 0.22em;
  color: var(--ink-2);
}

.cover__sub span {
  color: var(--ink-4);
  padding-inline: 6px;
}

.cover__enter {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  padding-bottom: 6px;
}

.cover__enter-label {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid rgba(237, 235, 230, 0.16);
  background: rgba(8, 9, 11, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.cover__cta {
  display: inline-flex;
  align-items: center;
  gap: clamp(16px, 2vw, 26px);
  padding: clamp(14px, 1.5vw, 18px) clamp(18px, 2vw, 26px);
  border: 1px solid var(--line-strong);
  background: rgba(10, 11, 13, 0.42);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--ink);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.cover__cta-arr {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  font-size: 0.7rem;
  line-height: 1;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.cover__cta:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.cover__cta:hover .cover__cta-arr {
  border-color: rgba(8, 9, 11, 0.35);
  transform: translate(2px, -2px);
}

.cover__hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-shadow: 0 1px 12px rgba(4, 5, 7, 0.8);
}

.cover__hint-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: hint-pulse 2.6s var(--ease) infinite;
}

@keyframes hint-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* ---- bottom meta -------------------------------------------------------- */

.cover__credit,
.cover__geo {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0.92;
  text-shadow: 0 1px 12px rgba(4, 5, 7, 0.8);
}

.cover__credit em {
  font-style: normal;
  color: var(--ink-2);
}

.cover__geo {
  text-align: right;
}

/* ---- mouse-follow ENTER chip ------------------------------------------- */

.cover__cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  border-radius: 50%;
  border: 1px solid rgba(237, 235, 230, 0.34);
  background: rgba(9, 10, 12, 0.34);
  backdrop-filter: blur(9px) saturate(1.15);
  -webkit-backdrop-filter: blur(9px) saturate(1.15);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0) scale(0.7);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.cover__cursor span {
  display: block;
  text-align: center;
  line-height: 1.3;
}

.cover__cursor i {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  margin-top: 3px;
  color: var(--accent-bright);
}

@media (pointer: fine) {
  .cover__cursor.is-visible {
    opacity: 1;
  }
}
@media (pointer: coarse) {
  .cover__cursor {
    display: none;
  }
}

/* ---- loader ------------------------------------------------------------- */

.cover__loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 720ms var(--ease), visibility 720ms;
}

.cover__loader.is-done {
  opacity: 0;
  visibility: hidden;
}

.cover__loader-inner {
  width: min(320px, 70vw);
  text-align: center;
}

.cover__loader-inner .mono {
  font-size: 0.58rem;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.cover__loader-bar {
  height: 1px;
  width: 100%;
  background: var(--line);
  overflow: hidden;
}

.cover__loader-bar i {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--accent);
  animation: loader-slide 1.15s var(--ease) infinite;
}

@keyframes loader-slide {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(360%);
  }
}

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 1024px) {
  .cover__main {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 34px;
  }

  .cover__enter {
    align-items: flex-start;
    text-align: left;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 22px;
  }

  .cover__enter-label {
    width: 100%;
    order: -1;
  }
}

@media (max-width: 640px) {
  .cover {
    padding: 16px 20px 14px;
  }

  .cover__scrim {
    background: linear-gradient(
        to top,
        rgba(8, 9, 11, 0.97) 0%,
        rgba(8, 9, 11, 0.88) 26%,
        rgba(8, 9, 11, 0.46) 50%,
        rgba(8, 9, 11, 0.06) 70%
      ),
      linear-gradient(to bottom, rgba(8, 9, 11, 0.86) 0%, rgba(8, 9, 11, 0) 26%),
      radial-gradient(140% 90% at 50% 40%, rgba(8, 9, 11, 0) 34%, rgba(5, 6, 8, 0.62) 100%);
  }

  .cover__cta {
    background: rgba(10, 11, 13, 0.68);
  }

  .cover__top-meta span:first-child {
    display: none;
  }

  .cover__role-sm {
    font-size: 0.56rem;
    letter-spacing: 0.16em;
  }

  .cover__hero {
    padding-top: 4px;
  }

  .cover__title {
    letter-spacing: 0.04em;
  }

  .cover__sub {
    margin-top: 12px;
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    line-height: 1.8;
  }

  .cover__sub span {
    display: none;
  }

  .cover__main {
    padding-bottom: 10px;
  }

  .cover__cta {
    width: 100%;
    justify-content: space-between;
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    background: rgba(10, 11, 13, 0.55);
  }

  .cover__credit {
    display: none;
  }

  .cover__geo {
    margin-left: auto;
  }
}

/* =========================================================================
   v0.2 — post-QA fixes (mobile composition + required copy)
   ========================================================================= */

.cover__credit-tail {
  opacity: 0.75;
}

/* tablet / mobile: keep the enter cluster anchored to the bottom bar */
@media (max-width: 1024px) {
  .cover__main {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    gap: clamp(18px, 3vw, 26px);
  }
}

@media (max-width: 640px) {
  .cover__top-meta span:first-child {
    display: inline;
    font-size: 0.54rem;
  }

  .cover__top-meta {
    gap: 10px;
  }

  .cover__credit {
    display: block;
    font-size: 0.52rem;
    letter-spacing: 0.12em;
  }

  .cover__credit-tail {
    display: none;
  }

  .cover__geo {
    display: none;
  }

  .cover__main {
    gap: 22px;
  }

  .cover__enter {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cover__enter-label {
    order: 0;
    width: 100%;
    justify-content: center;
  }

  .cover__hint {
    justify-content: center;
  }

  .cover__title {
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.8), 0 1px 12px rgba(0, 0, 0, 0.55);
  }
}

@media (max-width: 640px) {
  .cover__role-sm {
    font-size: 0.5rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }

  .cover__top-meta {
    gap: 8px;
    font-size: 0.5rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
    flex: none;
  }

  .cover__top-meta span:first-child {
    font-size: 0.5rem;
  }

  .cover__scene {
    transform: scale(1.08) translateY(-4%);
  }
}

/* =========================================================================
   v0.3 — pointer-driven scene + drag/click to enter
   ========================================================================= */

.cover {
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

.cover__scene,
.cover img {
  -webkit-user-drag: none;
  user-drag: none;
}

.cover.is-pressing .cover__title {
  transform: scale(0.994);
  transition: transform 600ms var(--ease);
}

.cover__title {
  transition: transform 900ms var(--ease);
}

.cover__hint {
  letter-spacing: 0.16em;
}
