/* The hero: the 3D city fills the screen; type sits on the open sky to the left. */
/* the stage: one live city behind the whole page. Past the hero it goes soft-focus under a veil tinted with
   the sky, so every section floats over the same city at the same hour and weather. --veil runs 0 -> 1 */
.stage { position: fixed; inset: 0; z-index: 0; height: 100lvh; overflow: hidden; pointer-events: none; background: var(--sky-top); }
.hero-gl {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.6s ease;
  filter: blur(calc(var(--veil, 0) * 8px)) saturate(calc(1 + var(--veil, 0) * .25)); transform: scale(calc(1 + var(--veil, 0) * .05));
}
html.gl-ready .hero-gl { opacity: 1; }
.stage-veil {
  position: absolute; inset: 0; opacity: var(--veil, 0);
  background: linear-gradient(180deg, color-mix(in srgb, var(--page) 46%, transparent) 0%, color-mix(in srgb, var(--page) 66%, transparent) 100%);
}
main, .footer { position: relative; z-index: 1; }
.hero { position: relative; isolation: isolate; height: 100svh; min-height: 620px; overflow: hidden; color: var(--ink); }
/* without WebGL (or while three.js loads) a sky gradient stands in, following the live phase */
.hero-fallback {
  position: absolute; inset: 0; transition: opacity 1.6s ease;
  background: linear-gradient(180deg, #4f86c6 0%, #9cc3e6 55%, #e7eef3 72%, #9fb2c3 72.2%, #c8d3dc 100%);
}
html[data-phase="dawn"] .hero-fallback, html[data-phase="dusk"] .hero-fallback { background: linear-gradient(180deg, #2b4785 0%, #d48c87 52%, #ffbe74 71%, #6a6280 71.2%, #3c3650 100%); }
html[data-phase="night"] .hero-fallback { background: linear-gradient(180deg, #02040c 0%, #0b1636 55%, #1a1530 71%, #090d1c 71.2%, #05070f 100%); }
html.gl-ready .hero-fallback { opacity: 0; }
.hero-shade {                                      /* keeps the copy legible over any sky */
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--halo) 70%, transparent) 0%, transparent 40%), linear-gradient(180deg, color-mix(in srgb, var(--halo) 55%, transparent) 0%, transparent 20%);
  transition: background 1.2s ease;
}

.hero-inner {
  position: relative; z-index: 2; height: 100%; width: var(--wrap); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; column-gap: 40px;
  padding: clamp(96px, 15vh, 150px) 0 28px;
}
.hero-copy { max-width: 600px; text-shadow: 0 0 28px var(--halo); translate: calc(var(--lx, 0) * -14px) calc(var(--ly, 0) * 9px); transition: translate .9s var(--out); }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; font-family: var(--caps); font-size: .78rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--soft); transition: color 1.2s ease; }
html[lang="zh"] .hero-eyebrow { font-family: var(--serif); letter-spacing: .18em; }
.live-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #3fbf86; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid #3fbf86; animation: ping 2.4s var(--out) infinite; }
.hero.playing .live-dot { background: var(--accent); }
.hero.playing .live-dot::after { border-color: var(--accent); }
.hero-view { margin: 10px 0 22px; font-size: .95rem; color: var(--soft); transition: color 1.2s ease; }
html[lang="en"] .hero-view { font-family: var(--serif); font-style: italic; font-size: 1.12rem; }
.hero-title { font-size: clamp(2.6rem, 5.6vw, 4.6rem); font-weight: 900; line-height: 1.16; letter-spacing: .04em; color: var(--ink); transition: color 1.2s ease; }
html[lang="en"] .hero-title { font-size: clamp(3rem, 7vw, 5.8rem); font-weight: 600; line-height: .98; letter-spacing: -.01em; }
.hero-title em { font-style: normal; color: var(--accent); transition: color 1.2s ease; }
html[lang="en"] .hero-title em { font-style: italic; }
.hero-lead { margin: 22px 0 30px; max-width: 34em; font-size: 1.02rem; line-height: 1.85; color: var(--soft); transition: color 1.2s ease; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-primary { background: var(--ink); color: var(--on-accent); box-shadow: 0 16px 32px -16px rgba(0, 0, 0, .55); }
.hero .btn-ico { background: var(--accent); color: var(--on-accent); }
.hero .btn-ghost { color: var(--ink); background: color-mix(in srgb, var(--sky-top) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 26%, transparent); }
.hero .btn-ghost:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 55%, transparent); color: var(--ink); }

.hero-stats {
  display: flex; align-self: start; margin: 6px 0 0; padding: 14px 4px; list-style: none; border-radius: 18px;
  background: color-mix(in srgb, var(--sky-top) 16%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  transition: background-color 1.2s ease, border-color 1.2s ease;
}
.hero-stats li + li { border-left: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.stat { display: block; padding: 0 22px; text-decoration: none; color: var(--ink); font-size: .78rem; color: var(--soft); transition: transform .45s var(--out), color 1.2s ease; }
.stat b { display: block; font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 3rem; line-height: 1; color: var(--ink); transition: color 1.2s ease; }
.stat:hover { transform: translateY(-3px); }
html[lang="en"] .stat { font-family: var(--caps); letter-spacing: .14em; text-transform: uppercase; font-size: .66rem; }

.hero-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; font-size: .8rem; letter-spacing: .2em; text-decoration: none; color: var(--soft); text-transform: uppercase; }
.scroll-line { position: relative; width: 1px; height: 38px; overflow: hidden; background: color-mix(in srgb, var(--ink) 20%, transparent); }
.scroll-line::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: drip 2.2s var(--io) infinite; }
.play-day {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px 10px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); background: color-mix(in srgb, var(--sky-top) 22%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ink); font-size: .85rem;
  transition: transform .45s var(--out), border-color .4s ease, background-color .8s ease;
}
.play-day { position: relative; }
.play-day svg:not(.play-ring) { width: 15px; height: 15px; transition: transform .45s var(--out); }
.play-ring { position: absolute; left: 6px; top: 50%; width: 27px; height: 27px; margin-top: -13.5px; transform: rotate(-90deg); pointer-events: none; }
.play-ring circle { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--pp, 0)); opacity: 0; transition: opacity .4s ease; }
.play-day[aria-pressed="true"] .play-ring circle { opacity: 1; }
.play-day:hover { transform: translateY(-2px); border-color: var(--ink); }
.play-day:hover svg:not(.play-ring) { transform: scale(1.15); }
.play-day:active { transform: scale(.96); }
.play-day[aria-pressed="true"] { border-color: var(--accent); }
.play-day[aria-pressed="true"] svg:not(.play-ring) { opacity: .35; }

.motion-chip { display: none; }
.motion-chip[hidden] { display: none !important; }
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes drip { from { transform: translateY(0); } to { transform: translateY(350%); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .hero { min-height: 560px; }
  .hero-shade { background: linear-gradient(180deg, var(--halo) 0%, color-mix(in srgb, var(--halo) 60%, transparent) 38%, transparent 58%); }
  .hero-inner { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto auto; padding-top: 92px; padding-bottom: 18px; }
  .hero-title { font-size: clamp(2.3rem, 10.5vw, 3rem); }
  html[lang="en"] .hero-title { font-size: clamp(2.7rem, 12.5vw, 3.4rem); }
  .hero-lead { margin: 16px 0 22px; font-size: .95rem; }
  .hero-stats { grid-row: 3; align-self: end; justify-self: start; margin: 0 0 14px; }
  .stat { padding: 0 14px; }
  .hero-stats li:first-child .stat { padding-left: 0; }
  .stat b { font-size: 2.2rem; }
  .hero-foot { grid-row: 4; align-self: end; }
  .scroll-cue { font-size: .72rem; }
  .motion-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; cursor: pointer; font-size: .8rem; color: var(--ink);
    border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); background: color-mix(in srgb, var(--sky-top) 22%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: nudge 2.8s var(--io) infinite;
  }
  .motion-chip svg { width: 16px; height: 16px; }
}

.hero.no-gl .play-day { display: none; }
.play-day[hidden] { display: none; }
@keyframes nudge { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-5deg); } 86% { transform: rotate(5deg); } }
