/* Home page: hero, section index and the five numbered sections. */

/* ---------- Opening animation (assets/js/intro.js) ---------- */
.intro { display: none; }
html.intro-running { overflow: hidden; }
html.intro-running .intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: block;
  background: var(--color-background);
  transition: opacity 0.7s ease;
}
.intro.is-leaving { opacity: 0; }
.intro-canvas { display: block; width: 100%; height: 100%; }
.intro-caption {
  position: absolute;
  right: 0;
  bottom: 12%;
  left: 0;
  margin: 0;
  color: var(--color-primary);
  font: 500 0.78rem var(--font-serif);
  letter-spacing: 0.42em;
  text-align: center;
  opacity: 0;
}
.intro-caption span { margin-inline: 0.6em; }
/* On a phone the wide letter-spacing made 向前深入 wrap as 向前深 / 入; keep it on one line. */
@media (max-width: 640px) {
  .intro-caption { padding-inline: 8px; font-size: 0.68rem; letter-spacing: 0.2em; white-space: nowrap; }
  .intro-caption span { margin-inline: 0.35em; }
}
.intro-skip {
  position: absolute;
  right: clamp(20px, 3vw, 44px);
  bottom: clamp(20px, 3vw, 40px);
  padding: 12px 18px;
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-foreground-muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}
.intro-skip:hover,
.intro-skip:focus-visible { border-color: var(--color-primary); color: var(--color-foreground); }

/* The hero rises into place: on load for returning visitors, and as the opening dissolves otherwise. */
.hero-center > * { animation: intro-rise 0.9s var(--ease) both; }
.hero-center > :nth-child(2) { animation-delay: 0.1s; }
.hero-center > :nth-child(3) { animation-delay: 0.2s; }
.hero-center > :nth-child(4) { animation-delay: 0.3s; }
.hero-center > :nth-child(5) { animation-delay: 0.4s; }
.hero-center > :nth-child(6) { animation-delay: 0.5s; }
html.intro-running:not(.intro-done) .hero-center > * { animation: none; opacity: 0; }
/* The result area is shown/hidden by content, which would restart the load animation (with its
   delay) every time it appears. Animate the result cards themselves instead, with no delay. */
.hero-center > .verify-out { animation: none; opacity: 1; }
html.intro-running:not(.intro-done) .hero-center > .verify-out { opacity: 1; }
.verify-out .verify-card,
.verify-out .verify-none,
.verify-out .verify-meaning { animation: intro-rise 0.55s var(--ease) both; }
@keyframes intro-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(660px, 100svh, 940px);
  overflow: hidden;
  background: var(--color-background);
}
.hero-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-glow {
  position: absolute;
  top: -6%;
  left: 50%;
  width: min(84vw, 1060px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(122 16 25 / 0.82), rgb(74 14 18 / 0.42) 55%, transparent 76%);
}
.hero-rosette {
  position: absolute;
  top: -22%;
  left: 50%;
  margin-left: calc(min(84vw, 1080px) / -2);
  width: min(84vw, 1080px);
  aspect-ratio: 1;
  background: url("../img/rosette.svg") center / contain no-repeat;
  opacity: 0.17;
  animation: spin 260s linear infinite;
}
.hero-skyline {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: max(100%, 1000px);
  max-width: 1900px;
  aspect-ratio: 1600 / 300;
  transform: translateX(-50%);
  background: url("../img/skyline.svg") center bottom / 100% 100% no-repeat;
  opacity: 0.92;
}
/* The register hero: ring, headline, tagline, verifier. Centred, under the transparent header. */
.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(var(--header-h) + clamp(24px, 4vw, 56px));
  padding-bottom: clamp(170px, 20vw, 290px);
  text-align: center;
}
.hero-ring {
  position: relative;
  width: clamp(132px, 15vw, 196px);
  margin-bottom: clamp(18px, 2.4vw, 30px);
  animation: ring-float 7s ease-in-out infinite;
}
.hero-ring::before {
  content: "";
  position: absolute;
  inset: -46%;
  background: radial-gradient(closest-side, rgb(222 38 44 / 0.62), rgb(160 22 30 / 0.28) 52%, transparent 72%);
  animation: ring-glow 4.5s ease-in-out infinite;
}
.hero-ring-art {
  position: relative;
  display: block;
  aspect-ratio: 260 / 250;
  background-repeat: no-repeat;
  background-size: 384.6% auto;
  background-position: 23.24% 49.2%;
  filter: drop-shadow(0 0 20px rgb(200 24 34 / 0.5));
}
.hero-center h1 {
  font-size: clamp(2.4rem, 1.2rem + 4.6vw, 4.6rem);
  line-height: 1.22;
  letter-spacing: 0.04em;
}
.hero-center h1 em { color: var(--color-primary); font-style: normal; }
.hero-tagline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.9em;
  margin-top: 14px;
  color: var(--color-primary);
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.15rem);
  letter-spacing: 0.3em;
}
.hero-tagline i { font-style: normal; opacity: 0.7; }

.hero-verify { width: min(560px, 100%); margin-top: clamp(26px, 3.4vw, 40px); }
.verify-out { width: min(640px, 100%); margin-top: 18px; text-align: left; }
.verify-out:empty { display: none; }
.verify-examples { margin-top: 16px; color: var(--fg-muted); font-size: 0.88rem; }
.verify-examples > span { margin-right: 0.5em; }
.verify-example { margin: 0 0.6em; color: var(--color-foreground-muted); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--rule); }
.verify-example:hover { color: var(--color-primary); }
.hero-links { display: flex; gap: 12px 32px; margin-top: 22px; }

@keyframes ring-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ring-glow { 0%, 100% { opacity: 0.8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

/* ---------- Section index ---------- */
/* Hairline dividers come from a 1px grid gap over a line-coloured track, so they stay continuous at
   every column count. An odd last cell spans the leftover columns, so no empty cell shows the line colour. */
.ledger { border-bottom: 1px solid var(--color-border-subtle); }
.ledger ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-border-subtle);
  border-inline: 1px solid var(--color-border-subtle);
}
.ledger a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  height: 100%;
  padding: 26px 24px;
  background: var(--color-background);
  color: var(--fg-muted);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.ledger a:hover,
.ledger a[aria-current] {
  background-image: linear-gradient(rgb(212 175 90 / 0.07), rgb(212 175 90 / 0.07));
  color: var(--fg);
}

/* ---------- 01 Programme ---------- */
.plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 112px);
  padding-block: clamp(88px, 11vw, 152px);
}
.plan-media { position: relative; }
.plan-seal {
  position: absolute;
  right: -34px;
  bottom: -40px;
  width: clamp(108px, 13vw, 168px);
  filter: drop-shadow(0 10px 24px rgb(0 0 0 / 0.5));
}
.plan-copy h2 { margin: 22px 0; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.3; }
.plan-copy .lede { max-width: 30em; color: var(--fg-muted); font-size: 1.1rem; }
.focus { margin: 44px 0; counter-reset: focus; }
.focus > div {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 4px 20px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  counter-increment: focus;
}
.focus > div:last-child { border-bottom: 1px solid var(--rule); }
.focus > div::before {
  content: counter(focus, upper-roman);
  grid-row: span 2;
  color: var(--accent);
  font: 500 1.2rem / 1.4 var(--font-serif);
}
.focus dt { font: 500 1.15rem / 1.5 var(--font-serif); }
.focus dd { color: var(--fg-muted); font-size: 0.95rem; }

/* ---------- Section heads (02, 04) ---------- */
.latest-head,
.business-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px 32px;
  margin-bottom: 56px;
}
.latest-head .kicker,
.business-head .kicker { grid-column: 1 / -1; }
.latest-head h2,
.business-head h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.2rem); }

/* ---------- 02 Latest ---------- */
.latest,
.business { padding-block: clamp(80px, 10vw, 136px); }
.latest-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 0 clamp(40px, 6vw, 88px);
}
.latest-grid .story.lead { grid-row: span 2; }
.latest-grid .story.side { padding-bottom: 32px; }
.latest-grid .story.side + .story.side { padding-top: 32px; border-top: 1px solid var(--rule); }
.latest-grid .story.side > a { grid-template-columns: 150px minmax(0, 1fr); gap: 24px; }
.latest-grid .story.side .story-media { aspect-ratio: 0.9; }
.latest-grid .story.side h3 { margin-top: 6px; font-size: 1.15rem; }
.latest-grid .story.side .story-summary { -webkit-line-clamp: 2; }

/* ---------- 03 People ---------- */
.people {
  position: relative;
  overflow: hidden;
  padding-block: clamp(80px, 10vw, 136px);
  background: var(--color-surface);
  border-block: 1px solid var(--color-border-subtle);
}
.people::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -12%;
  width: min(70vw, 760px);
  aspect-ratio: 1;
  background: url("../img/rosette.svg") center / contain no-repeat;
  opacity: 0.09;
  pointer-events: none;
}
.people > .shell { position: relative; }
.people-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 16px 64px;
  margin-bottom: 56px;
}
.people-head .kicker { grid-column: 1 / -1; }
.people-head h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.2rem); }
.people-head p:not(.kicker) { max-width: 26em; color: var(--fg-muted); }
.people .explore-controls { border-block-color: var(--color-border-subtle); }
.people .person-media { background: var(--color-background); }

/* ---------- 04 Business ---------- */
.business-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 6vw, 88px);
}
.business-list { counter-reset: biz; }
.business-list .story { padding-block: 26px; border-top: 1px solid var(--rule); counter-increment: biz; }
.business-list .story:first-child { padding-top: 0; border-top: 0; }
.business-list .story > a { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 20px; }
.business-list .story > a::before {
  content: counter(biz, decimal-leading-zero);
  padding-top: 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}
.business-list .story-media { display: none; }
.business-list .story h3 { margin-top: 6px; font-size: 1.2rem; }
.business-list .story-summary { -webkit-line-clamp: 2; }

/* ---------- 05 Archive ---------- */
.more {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  gap: clamp(40px, 7vw, 112px);
  padding-block: clamp(88px, 11vw, 152px);
}
.more-intro { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
.more-intro h2 { margin: 22px 0; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); line-height: 1.25; }
.more-intro p:not(.kicker) { margin-bottom: 28px; color: var(--fg-muted); }
.more-list a {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.more-list li:last-child a { border-bottom: 1px solid var(--rule); }
.more-list time { color: var(--fg-muted); font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.06em; }
.more-list h3 { font-size: 1.25rem; line-height: 1.6; transition: color var(--dur) var(--ease); }
.more-list a:hover h3 { color: var(--accent); }
.more-thumb { aspect-ratio: 3 / 2; overflow: hidden; background: var(--color-surface); }
.more-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.85) sepia(0.22) contrast(1.05);
  transition: filter 0.6s var(--ease), transform 0.9s var(--ease);
}
.more-list a:hover .more-thumb img { filter: none; transform: scale(1.04); }

/* ---------- Reveal (applied only by JS, only to sections below the fold) ---------- */
.asp-reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.asp-reveal.is-visible { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ledger ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ledger li:last-child { grid-column: 2 / -1; }
}
@media (max-width: 900px) {
  .hero-center { padding-bottom: 200px; }
  .plan,
  .people-head,
  .latest-grid,
  .business-grid,
  .more { grid-template-columns: minmax(0, 1fr); }
  .plan-seal { right: -12px; bottom: -36px; }
  .latest-grid .story.lead { grid-row: auto; margin-bottom: 36px; }
  .more-intro { position: static; }
}
@media (max-width: 640px) {
  /* Break the headline at the word boundary (亚洲成功人士 / 荣誉名册) instead of splitting 人士. */
  .hero-center h1 { font-size: clamp(2.1rem, 9.2vw, 2.8rem); }
  .hero-center h1 em { display: block; }
  .hero-tagline { letter-spacing: 0.18em; }
  .hero-links { flex-direction: column; align-items: center; }
  .ledger ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger a { gap: 12px; padding: 18px 16px; letter-spacing: 0.1em; }
  .ledger li:last-child { grid-column: 1 / -1; }
  .more-list a { grid-template-columns: minmax(0, 1fr) 96px; gap: 8px 18px; }
  .more-list time { grid-column: 1 / -1; }
  .latest-grid .story.side > a { grid-template-columns: 112px minmax(0, 1fr); gap: 18px; }
  .focus > div { grid-template-columns: 40px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  /* The opening never starts by itself for these visitors (see the gate in inc/setup.php); it only
     plays if they explicitly ask for it with ?intro=1, so the overlay must be allowed to show. */
  .hero-center > *,
  .verify-out .verify-card,
  .verify-out .verify-none,
  .verify-out .verify-meaning,
  .hero-ring,
  .hero-ring::before { animation: none; }
  html.intro-running:not(.intro-done) .hero-center > * { opacity: 1; }
  .hero-rosette { animation: none; }
  .asp-reveal { opacity: 1; transform: none; transition: none; }
}
