/* ============================================================
   封面（已定稿，保持原样）：对角线斜切 + 两面卡片墙
   颜色来自 tokens.css 的 --cover-*。
   ============================================================ */

.landing {
  z-index: 2;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(110% 90% at 82% 18%, var(--cover-navy-glow), transparent 58%),
    var(--cover-navy);
}

.landing-bg-youth-wrapper {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(8px 4px 16px rgba(0, 0, 0, 0.75));
}

.landing-bg-youth {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(95% 88% at 32% 46%, var(--cover-green-glow), transparent 64%),
    linear-gradient(
      135deg,
      var(--cover-green-1) 0%,
      var(--cover-green-2) 48%,
      var(--cover-green-3) 64%,
      #6f928a 78%,
      #c3ccca 90%,
      #eef0ea 100%
    );
  clip-path: polygon(0 0, 83.6% 0, 20.8% 100%, 0 100%);
}

.landing-zone {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.landing-zone.is-youth {
  clip-path: polygon(0 0, 83.6% 0, 20.8% 100%, 0 100%);
}

.landing-zone.is-adult {
  z-index: 2;
  clip-path: polygon(83.6% 0, 100% 0, 100% 100%, 20.8% 100%);
}

.landing-scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.landing-scroll::-webkit-scrollbar {
  display: none;
}

.landing-zone.is-youth .landing-scroll {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - clamp(100px, 18vh, 180px)), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - clamp(100px, 18vh, 180px)), transparent 100%);
}

.landing-zone.is-adult .landing-scroll {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 clamp(90px, 16vh, 150px), #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 clamp(90px, 16vh, 150px), #000 100%);
}

.landing-card-field {
  position: relative;
  width: 100%;
  min-height: 190vh;
}

.landing-card {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: block;
  width: var(--w);
  height: var(--h);
  overflow: hidden;
  border-radius: 7px;
  background: var(--cover-card);
  box-shadow: var(--shadow-float);
  transform: rotate(var(--r, 0deg)) translateZ(0);
  transition:
    transform 260ms var(--ease),
    box-shadow 260ms ease,
    filter 260ms ease;
}

.landing-card:hover,
.landing-card:focus-visible {
  z-index: 7;
  outline: none;
  filter: saturate(1.04) brightness(1.04);
  transform: rotate(var(--r, 0deg)) translateY(-8px) scale(1.025);
  box-shadow:
    0 26px 50px rgba(1, 10, 17, 0.34),
    0 5px 16px rgba(1, 10, 17, 0.24);
}

.landing-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--cover-card);
  pointer-events: none;
}

.landing-card.is-cover img {
  object-fit: cover;
}

/* 卡片悬停时从下方翻出原文 */
.card-reveal {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  padding: clamp(8px, 0.9vw, 14px);
  overflow: hidden;
  background: rgba(252, 250, 245, 0.97);
  opacity: 0;
  visibility: hidden;
  transform: translateY(116%);
  pointer-events: none;
  transition:
    transform 360ms var(--ease),
    opacity 220ms ease,
    visibility 0s linear 360ms;
}

.landing-card:hover .card-reveal,
.landing-card:focus-visible .card-reveal {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    transform 360ms var(--ease),
    opacity 160ms ease;
}

.reveal-text {
  display: -webkit-box;
  overflow: hidden;
  color: #1c1c1c;
  font-family: var(--font-card);
  font-size: clamp(10px, 0.86vw, 15px);
  font-weight: 500;
  line-height: 1.46;
  letter-spacing: 0.03em;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

/* 标题 */
.home-title {
  position: absolute;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  grid-template-areas:
    "main edition"
    "sub edition";
  align-items: center;
  gap: 2px 16px;
  color: var(--cover-title);
  text-align: left;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgba(1, 12, 20, 0.32);
}

.home-title-youth {
  left: clamp(28px, 2.3vw, 46px);
  bottom: clamp(20px, 2.6vw, 44px);
  bottom: max(clamp(20px, 2.6vw, 44px), env(safe-area-inset-bottom));
}

.home-title-adult {
  top: clamp(18px, 2vw, 36px);
  top: max(clamp(18px, 2vw, 36px), env(safe-area-inset-top));
  right: clamp(28px, 3vw, 56px);
}

.home-title-main {
  grid-area: main;
  font-size: clamp(26px, 2.15vw, 40px);
  font-weight: 760;
  line-height: 1.02;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.home-title-sub {
  grid-area: sub;
  font-size: clamp(17px, 1.55vw, 31px);
  font-weight: 420;
  line-height: 1.04;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.home-title-edition {
  grid-area: edition;
  max-width: 1.2em;
  font-size: clamp(14px, 1.2vw, 22px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.04em;
}

/* 语言切换放在左上（绿色区），不再压住右上的成人版标题 */
.cover-lang {
  position: absolute;
  z-index: 12;
  top: max(16px, env(safe-area-inset-top));
  left: 16px;
}

/* 手机竖屏专用块（大屏隐藏） */
.cover-m {
  display: none;
}

/* ---------- 手机 / 竖屏：两个梯形 + app 式入口 ----------
   斜线从右侧 44% 高度拉到左侧 56% 高度，上下两块都是梯形。
   大屏的散落卡片墙在手机上太小看不清，竖屏时换成 .cover-m：
   标题、数字、一排看得清的提案卡、进入按钮。 */
@media (max-width: 640px), (orientation: portrait) {
  .landing {
    --cut-right: 44%;
    --cut-left: 56%;
  }

  .landing-bg-youth-wrapper {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
  }

  .landing-bg-youth {
    clip-path: polygon(0 0, 100% 0, 100% var(--cut-right), 0 var(--cut-left));
  }

  .landing-zone,
  .home-title {
    display: none;
  }

  .cover-m {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0 20px;
    color: var(--cover-title);
  }

  .cover-m-youth {
    top: 0;
    padding-top: calc(max(16px, env(safe-area-inset-top)) + 52px);
  }

  .cover-m-adult {
    bottom: 0;
    padding-bottom: calc(max(20px, env(safe-area-inset-bottom)) + 4px);
  }

  .cover-m-head {
    display: grid;
    gap: 2px;
    text-shadow: 0 2px 10px rgba(1, 12, 20, 0.28);
  }

  .cover-m-edition {
    display: inline-block;
    justify-self: start;
    margin-bottom: 4px;
    padding: 3px 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-shadow: none;
  }

  .cover-m-title {
    font-size: clamp(26px, 8vw, 32px);
    font-weight: 760;
    line-height: 1.1;
    letter-spacing: 0.04em;
  }

  .cover-m-sub {
    font-size: 15px;
    letter-spacing: 0.03em;
    opacity: 0.9;
  }

  .cover-m-stats {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.78;
  }

  /* 一排横向滑动的提案卡：字够大、看得清 */
  .cover-m-cards {
    display: flex;
    gap: 12px;
    margin: 0 -20px;
    padding: 6px 20px 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .cover-m-cards::-webkit-scrollbar {
    display: none;
  }

  .cover-m-card {
    display: flex;
    flex: 0 0 156px;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    height: 104px;
    padding: 10px 12px;
    border-radius: 7px;
    background: var(--cover-card);
    color: #1c1c1c;
    box-shadow: 0 10px 22px rgba(1, 10, 17, 0.28), 0 2px 6px rgba(1, 10, 17, 0.2);
    transform: rotate(-0.6deg);
    scroll-snap-align: start;
  }

  .cover-m-card:nth-child(even) {
    transform: rotate(0.6deg);
  }

  .cover-m-card-text {
    display: -webkit-box;
    overflow: hidden;
    font-family: var(--font-card);
    font-size: 14px;
    line-height: 1.45;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .cover-m-card-foot {
    color: #6b6f72;
    font-size: 11px;
  }

  .cover-m-enter {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--cover-title);
    color: var(--cover-green-3);
    font-size: 15px;
    font-weight: 650;
    box-shadow: 0 6px 16px rgba(1, 10, 17, 0.25);
  }

  .cover-m-adult .cover-m-enter {
    color: var(--cover-navy);
  }

  /* 矮屏：卡片缩小一点，避免压到斜线 */
  @media (max-height: 720px) {
    .cover-m {
      gap: 8px;
    }

    .cover-m-youth {
      padding-top: calc(max(12px, env(safe-area-inset-top)) + 44px);
    }

    .cover-m-sub {
      display: none;
    }

    .cover-m-cards {
      padding-bottom: 6px;
    }

    .cover-m-card {
      height: auto;
      padding: 8px 12px;
    }

    .cover-m-enter {
      height: 38px;
      font-size: 14px;
    }

    .cover-m-card-text {
      font-size: 13px;
      -webkit-line-clamp: 2;
    }

    .cover-m-title {
      font-size: 24px;
    }
  }
}
