/* =============================================================
   Mpay — world-class pass (mp.css)
   Loaded AFTER styles.css + mx.css. Owns: hero typography fix,
   living hero phone (two-state story + orbit chips), journey rail,
   chapter-numeral refinement, lining figures, money/security layout,
   scroll choreography. All motion gated by prefers-reduced-motion.
   ============================================================= */

/* ===================== 1 · hero typography ===================== */
.hero-title .hline {
  display: inline-block;
  white-space: nowrap;
  background: inherit; /* re-carry the gradient into the inline-block, then re-clip */
  -webkit-background-clip: text;
  background-clip: text;
}
body.zh .hero-title { font-size: clamp(3rem, 7.6vw, 6.2rem); line-height: 1.18; }
@media (max-width: 760px) {
  body.zh .hero-title { font-size: clamp(2.35rem, 12vw, 3.9rem); }
  .hero-title .hline { white-space: normal; }
}

/* line-by-line rise (runs once, on top of the base reveal) */
@keyframes mpLineUp {
  from { opacity: 0; transform: translateY(0.5em); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);     filter: blur(0); }
}
.js .hero-title .hline { animation: mpLineUp 0.95s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.js .hero-title .hline:nth-child(1) { animation-delay: 0.12s; }
.js .hero-title .hline:nth-child(3) { animation-delay: 0.30s; }

/* ===================== 2 · living hero phone ===================== */
.hero-phone { perspective: 1200px; }
.hero-phone .phone-frame {
  transform: rotate(-1.8deg);
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.7s ease;
  filter: drop-shadow(0 26px 54px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 34px rgba(227, 189, 99, 0.10));
}
.hero-phone:hover .phone-frame { transform: rotate(0deg) translateY(-4px); }
@keyframes mpPhoneIn {
  from { opacity: 0; transform: translateY(30px) rotate(-1.8deg); }
  to   { opacity: 1; transform: translateY(0) rotate(-1.8deg); }
}
.js .hero-phone .phone-frame { animation: mpPhoneIn 1.05s cubic-bezier(0.22, 0.61, 0.36, 1) 0.34s both; }

/* two-state story: confirm (scr-a) ⇄ settled (scr-b) */
.hero-phone .scr-a, .hero-phone .scr-b { transition: opacity 0.6s ease; }
@keyframes mpScrA { 0%, 44% { opacity: 1; } 52%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes mpScrB { 0%, 44% { opacity: 0; } 52%, 94% { opacity: 1; } 100% { opacity: 0; } }
.js .hero-phone .scr-a { animation: mpScrA 10s ease-in-out 2.2s infinite; }
.js .hero-phone .scr-b { animation: mpScrB 10s ease-in-out 2.2s infinite; opacity: 0; }

/* orbit chips — floating proof fragments */
.orbit-chip {
  position: absolute;
  z-index: 2;
  padding: 8px 14px;
  border: 1px solid rgba(227, 189, 99, 0.4);
  border-radius: 999px;
  background: linear-gradient(165deg, rgba(13, 22, 40, 0.92), rgba(7, 13, 26, 0.94));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(227, 189, 99, 0.06);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.orbit-chip.oc-a { top: 13%; left: -9%; }
.orbit-chip.oc-b { bottom: 19%; right: -10%; }
@keyframes mpFloatA { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes mpFloatB { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.js .orbit-chip.oc-a { animation: mpFloatA 7s ease-in-out 1s infinite; }
.js .orbit-chip.oc-b { animation: mpFloatB 9s ease-in-out 1.6s infinite; }
@media (max-width: 1180px) { .orbit-chip { display: none; } }

/* ===================== 3 · chapter numeral refinement ===================== */
.section-band > .section-inner::before {
  top: -0.26em;
  color: rgba(227, 189, 99, 0.052);
  font-variant-numeric: tabular-nums;
}
/* numeral is dimmed (0.052) — watermark may sit behind the heading by design; no padding push */
.console-band .section-inner { position: relative; }

/* ===================== 4 · lining figures (authority) ===================== */
.console-card .cv, .money-chip .mv, .pc-commit .v, .tx-metric .v {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.lf {
  font-family: "Inter", -apple-system, sans-serif;
  font-weight: 600;
  font-size: 0.82em;
  letter-spacing: 0.01em;
}

/* ===================== 5 · journey rail + light-up ===================== */
.journey-phones { position: relative; }
@media (min-width: 1061px) {
  .journey-phones::before {
    content: "";
    position: absolute;
    left: 3%; right: 3%;
    top: clamp(180px, 16vw, 235px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(227, 189, 99, 0.32) 10%, rgba(227, 189, 99, 0.32) 90%, transparent);
    z-index: 0;
  }
  .journey-phones::after {
    content: "";
    position: absolute;
    top: calc(clamp(180px, 16vw, 235px) - 1px);
    left: 3%;
    width: 96px; height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, #f3e3a6, transparent);
    filter: drop-shadow(0 0 6px rgba(243, 227, 166, 0.8));
    z-index: 0;
    opacity: 0;
  }
  .js .journey-phones::after { animation: mpRail 5.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) 1s infinite; }
  @keyframes mpRail {
    0%   { left: 3%;  opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { left: calc(97% - 96px); opacity: 0; }
  }
}
.jp-item { position: relative; z-index: 1; }
.jp-item .phone-frame { transition: filter 0.9s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); }
.js .jp-item.in .phone-frame {
  filter: drop-shadow(0 26px 54px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 24px rgba(227, 189, 99, 0.13));
}
.jp-item:hover .phone-frame { transform: translateY(-7px); }
.jp-num { font-size: 0.7rem; }
.jp-num::after {
  content: "";
  display: block;
  width: 26px; height: 1px;
  margin: 8px auto 2px;
  background: linear-gradient(90deg, transparent, rgba(227, 189, 99, 0.55), transparent);
}

/* ===================== 6 · two monies — editorial split ===================== */
#money .verify-card { max-width: none; }
@media (min-width: 901px) {
  #money .verify-card {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.86fr);
    column-gap: clamp(30px, 4.5vw, 64px);
    align-items: center;
  }
  #money .verify-card .vc-domain { grid-column: 1 / -1; }
  #money .verify-card > p { grid-column: 1; }
  #money .verify-card .dual-money {
    grid-column: 2;
    grid-row: 2 / span 2;
    grid-template-columns: 1fr;
    max-width: none;
    margin-top: 0;
    align-self: center;
  }
}
.money-chip { transition: border-color 0.35s ease, transform 0.35s ease; }
.money-chip:hover { border-color: var(--gold-bright); transform: translateY(-3px); }

/* ===================== 7 · security — full four-across ===================== */
@media (min-width: 1101px) { #security .assurance-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { #security .assurance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { #security .assurance-grid { grid-template-columns: 1fr; } }

/* ===================== 8 · FAQ measure ===================== */
.faq-list { max-width: 860px; }

/* ===================== 9 · light band equalization ===================== */
.console-card { transition: transform 0.35s cubic-bezier(0.16, 0.84, 0.32, 1), box-shadow 0.35s ease; }
.console-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(31, 42, 63, 0.12); }

/* ===================== 10 · reduced motion: everything off ===================== */
@media (prefers-reduced-motion: reduce) {
  .js .hero-title .hline,
  .js .hero-phone .phone-frame,
  .js .hero-phone .scr-a,
  .js .hero-phone .scr-b,
  .js .orbit-chip.oc-a,
  .js .orbit-chip.oc-b,
  .js .journey-phones::after { animation: none; }
  .js .hero-phone .scr-b { opacity: 0; }
  .hero-phone .phone-frame, .jp-item .phone-frame, .money-chip, .console-card { transition: none; }
  .hero-phone:hover .phone-frame, .jp-item:hover .phone-frame { transform: rotate(-1.8deg); }
}
