/* ==========================================================================
   Home screen — full-bleed hero + centred copy stack + one CTA
   Matches the approved concept: centred column, blue -> green gradient title,
   blue subtitle, muted intro lines, green capsule button.
   Nothing here (no iframe, no engine script) loads the 3D scene: the click
   only navigates to game.html.
   ========================================================================== */

html,
body.home {
  margin: 0;
  padding: 0;
  height: 100%;
}

body.home {
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: #cfe8f6;
  overflow: hidden;
}

/* ---------- hero illustration ---------- */

.hero {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  display: block;
  user-select: none;
  transform: scale(1.03);
  animation: heroDrift 26s var(--ease-out) both;
}

@keyframes heroDrift {
  from { transform: scale(1.07) translate3d(0, 0, 0); }
  to   { transform: scale(1.03) translate3d(0, -0.5%, 0); }
}

/* Soft bright halo behind the copy: keeps the mid-tone text readable on the
   high-key artwork without darkening the whole picture. */
.hero__halo {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 42% at 50% 40%,
      rgba(255, 255, 255, 0.52) 0%,
      rgba(255, 255, 255, 0.34) 46%,
      rgba(255, 255, 255, 0.10) 74%,
      rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 34%);
}

/* ---------- brand ---------- */

.brand {
  position: fixed;
  z-index: 3;
  top: 26px;
  left: 32px;
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(10, 30, 44, 0.70), 0 2px 14px rgba(10, 30, 44, 0.55);
}

/* ---------- centred copy stack ---------- */

.stage {
  position: fixed;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 clamp(24px, 7vw, 120px) 3vh;
  pointer-events: none;
}

.stage > * {
  pointer-events: auto;
}

.title {
  margin: 0;
  font-size: clamp(36px, 5.1vw, 76px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.title span {
  /* keeps the coloured display type crisp on mid-tones */
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55), 0 10px 26px rgba(16, 50, 70, 0.20);
}

.title__a { color: var(--sky-600); }    /* 2D   */
.title__b { color: #2fa39a; }           /* 转   */
.title__c { color: var(--green-700); }  /* 3D … */

.sub {
  margin: 18px 0 0;
  font-size: clamp(16px, 1.5vw, 24px);
  font-weight: 600;
  color: var(--sky-600);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.intro {
  margin: 8px 0 0;
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 400;
  color: var(--ink-700);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.intro:first-of-type {
  margin-top: 18px;
}

/* ---------- the only button ---------- */

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 196px;
  height: 58px;
  margin-top: clamp(26px, 4.4vh, 46px);
  padding: 0 44px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--green-500) 0%, var(--green-600) 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.14em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(71, 163, 68, 0.38), 0 0 0 8px rgba(255, 255, 255, 0.16);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              filter var(--dur-base) var(--ease-out);
}

.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 40px rgba(71, 163, 68, 0.50), 0 0 0 10px rgba(255, 255, 255, 0.22);
  filter: brightness(1.04);
}

.cta:active {
  transform: translateY(0) scale(0.99);
}

.cta:focus-visible {
  outline: 3px solid var(--amber-400);
  outline-offset: 4px;
}

.cta__label {
  position: relative;
  z-index: 1;
}

/* ---------- leaving transition (fired on click, before 3D loads) ---------- */

body.leaving .hero__img,
body.leaving .brand,
body.leaving .stage {
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .brand { top: 18px; left: 20px; font-size: var(--fs-md); }
  .stage { padding: 0 22px 2vh; }
  .cta { min-width: 168px; height: 52px; padding: 0 32px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__img { animation: none; transform: scale(1.03); }
}