:root {
  --bg: #050816;
  --bg-soft: #0d1230;
  --surface: rgba(11, 18, 42, 0.72);
  --surface-strong: rgba(15, 24, 56, 0.92);
  --surface-line: rgba(166, 193, 255, 0.14);
  --text: #f3f6ff;
  --muted: #a8b5d1;
  --accent: #77f2d7;
  --accent-alt: #86a8ff;
  --accent-warm: #ff9a62;
  --accent-gold: #ffe27a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.18);
  --shadow-glow: 0 0 40px rgba(119, 242, 215, 0.08);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --radius-xs: 10px;
  --max-width: 1180px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  --glass-border: 1px solid rgba(255, 255, 255, 0.09);
  --glass-border-hover: 1px solid rgba(119, 242, 215, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at 20% 15%, rgba(88, 129, 255, 0.26), transparent 28%),
    radial-gradient(circle at 80% 12%, rgba(119, 242, 215, 0.2), transparent 22%),
    radial-gradient(circle at 50% 120%, rgba(255, 154, 98, 0.16), transparent 34%),
    linear-gradient(180deg, #050816 0%, #09102a 36%, #050816 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.36;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.18));
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

/* ─── Scroll Progress ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt), var(--accent-warm));
  box-shadow: 0 0 20px rgba(119, 242, 215, 0.5), 0 0 60px rgba(119, 242, 215, 0.15);
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
}

/* ─── Site Shell ─── */
.site-shell {
  position: relative;
  z-index: 1;
}

/* ─── Topbar ─── */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 18px auto 0;
  padding: 14px 24px;
  border: var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  background: rgba(5, 8, 22, 0.52);
  box-shadow:
    0 20px 50px rgba(2, 8, 22, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.topbar:hover {
  background: rgba(5, 8, 22, 0.58);
  box-shadow:
    0 20px 50px rgba(2, 8, 22, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.12em;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.85;
}

.brand span {
  font-size: 0.86rem;
  color: var(--muted);
  transition: color 0.3s ease;
}

.brand strong {
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--text), var(--accent-alt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: inline-flex;
  gap: 6px;
  font-size: 0.92rem;
  color: rgba(243, 246, 255, 0.72);
}

.nav-links a {
  position: relative;
  padding: 6px 14px;
  border-radius: 999px;
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  transform: translateX(-50%);
  transition: width 0.35s var(--ease-out-expo);
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  border-radius: 1px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 60%;
}

.nav-links a.is-active {
  color: var(--accent);
}

.nav-links a.is-active::after {
  width: 60%;
}

.nav-cta {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, rgba(134, 168, 255, 0.18), rgba(119, 242, 215, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    transform 0.25s var(--ease-spring),
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(119, 242, 215, 0.3);
  background: linear-gradient(135deg, rgba(134, 168, 255, 0.24), rgba(119, 242, 215, 0.18));
  box-shadow: 0 4px 16px rgba(119, 242, 215, 0.1);
}

/* ─── Hero ─── */
.hero {
  position: relative;
  width: min(calc(100% - 32px), 1260px);
  margin: 24px auto 0;
  padding: 138px 0 96px;
  min-height: calc(100svh - 40px);
  border-radius: 40px;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(8, 11, 28, 0.76), rgba(7, 14, 34, 0.48)),
    radial-gradient(circle at 20% 20%, rgba(119, 242, 215, 0.16), transparent 28%),
    radial-gradient(circle at 80% 12%, rgba(134, 168, 255, 0.16), transparent 26%),
    rgba(8, 11, 28, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.08;
  mask-image: radial-gradient(circle at center, black 56%, transparent 100%);
}

.hero-glow,
.hero-orbit,
.hero-shard {
  position: absolute;
  pointer-events: none;
  will-change: transform;
}

.hero-glow {
  width: 30vw;
  height: 30vw;
  border-radius: 999px;
  filter: blur(18px);
}

.hero-glow-left {
  left: -8vw;
  top: -6vw;
  background: radial-gradient(circle, rgba(119, 242, 215, 0.36), transparent 60%);
}

.hero-glow-right {
  right: -8vw;
  top: 2vw;
  background: radial-gradient(circle, rgba(134, 168, 255, 0.42), transparent 56%);
}

.hero-orbit {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-orbit-large {
  right: 4%;
  bottom: 10%;
  width: 420px;
  height: 420px;
  box-shadow: inset 0 0 60px rgba(134, 168, 255, 0.04);
}

.hero-orbit-small {
  left: 10%;
  bottom: 14%;
  width: 220px;
  height: 220px;
  box-shadow: inset 0 0 40px rgba(119, 242, 215, 0.04);
}

.hero-shard {
  width: 220px;
  height: 220px;
  clip-path: polygon(50% 0%, 100% 46%, 68% 100%, 6% 76%, 0 24%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(134, 168, 255, 0.02));
  backdrop-filter: blur(16px);
}

.hero-shard-left {
  left: 8%;
  top: 16%;
}

.hero-shard-right {
  right: 14%;
  top: 12%;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.95fr);
  gap: 48px;
  width: min(calc(100% - 64px), 1140px);
  margin: 0 auto;
}

.hero-copy,
.hero-console {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-index,
.story-label,
.form-kicker {
  margin: 0 0 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(243, 246, 255, 0.52);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-index::after {
  content: "";
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-alt), transparent);
  opacity: 0.5;
}

.story-label {
  color: var(--accent-alt);
  opacity: 0.7;
}

.form-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.form-kicker::after {
  content: "";
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-warm), transparent);
  opacity: 0.5;
}

/* ─── Hero Welcome / Pretext-style Animated Text ─── */
.hero-welcome {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 120px;
}

.pretext-line {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.05;
  overflow: hidden;
}

.pretext-line-primary {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 500;
  color: var(--muted);
}

.pretext-line-name {
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  font-weight: 700;
  background: linear-gradient(135deg, #95ffe6, #77f2d7, #86a8ff, #a78bfa);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgba(119, 242, 215, 0.35));
  animation: gradientShift 6s ease-in-out infinite;
}

.pretext-line-sub {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 500;
  color: var(--accent-alt);
  opacity: 0.85;
}

/* Individual character spans injected by JS */
.pretext-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%) rotateX(-80deg);
  transition:
    opacity 0.5s var(--ease-out-expo),
    transform 0.5s var(--ease-out-expo);
  will-change: transform, opacity;
}

.pretext-char.is-revealed {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

/* Space character */
.pretext-char-space {
  display: inline-block;
  width: 0.3em;
}

/* Punctuation gets a slight accent glow */
.pretext-char-punct.is-revealed {
  filter: drop-shadow(0 0 6px rgba(119, 242, 215, 0.4));
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-title {
  margin: 0;
  max-width: 8ch;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4rem, 12vw, 8.4rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.hero-title span {
  display: block;
  background: linear-gradient(135deg, #95ffe6, #77f2d7, #86a8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(119, 242, 215, 0.3));
}

.hero-description {
  max-width: 620px;
  margin: 26px 0 0;
  font-size: 1.06rem;
  line-height: 1.9;
  color: var(--muted);
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* ─── Cheung Timeline ─── */
.cheung-timeline {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.timeline-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s ease, transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

.timeline-item:hover {
  border-color: rgba(119, 242, 215, 0.18);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.timeline-item:nth-child(1) .timeline-year { color: var(--accent); }
.timeline-item:nth-child(2) .timeline-year { color: var(--accent-alt); }
.timeline-item:nth-child(3) .timeline-year { color: var(--accent-warm); }

.timeline-year {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.timeline-role {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--text);
  font-weight: 500;
}

.timeline-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 2px;
}

/* ─── Buttons ─── */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 152px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition:
    transform 0.3s var(--ease-spring),
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255, 255, 255, 0.3), transparent 60%);
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.button:active::before {
  opacity: 1;
  transition: opacity 0s;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0) scale(0.98);
}

.button-solid {
  color: #04101c;
  background: linear-gradient(135deg, var(--accent), #a9ffe8);
  box-shadow: 0 4px 20px rgba(119, 242, 215, 0.2);
}

.button-solid:hover,
.button-solid:focus-visible {
  box-shadow: 0 8px 32px rgba(119, 242, 215, 0.3);
}

.button-solid::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.button-solid:hover::after {
  opacity: 1;
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: rgba(119, 242, 215, 0.3);
  background: rgba(119, 242, 215, 0.06);
  box-shadow: 0 4px 20px rgba(119, 242, 215, 0.08);
}

/* ─── Hero Metrics ─── */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 44px;
}

.hero-metrics article {
  padding: 20px 18px 22px;
  border-radius: var(--radius-sm);
  border: var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  transition:
    border-color 0.3s ease,
    transform 0.3s var(--ease-spring),
    box-shadow 0.3s ease;
}

.hero-metrics article:hover {
  border-color: rgba(119, 242, 215, 0.18);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.hero-metrics strong,
.console-stats strong,
.feed-count,
.message-card strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
}

.hero-metrics strong {
  font-size: 1.24rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ─── Hero Console ─── */
.hero-console {
  align-self: center;
  padding: 24px;
  border-radius: 34px;
  background: var(--glass-bg);
  border: var(--glass-border);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.console-topline,
.stage-panel-head,
.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.console-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  background: rgba(119, 242, 215, 0.12);
  color: #97ffea;
  border: 1px solid rgba(119, 242, 215, 0.15);
}

.console-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 2s ease-in-out infinite;
}

.console-label {
  color: rgba(243, 246, 255, 0.48);
  font-size: 0.86rem;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.04em;
}

.console-core {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(100%, 360px);
  margin: 28px auto 26px;
}

.console-ring,
.console-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.console-ring {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.console-ring::before,
.console-ring::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.07);
}

.console-ring-alt {
  inset: 12%;
  transform: rotate(18deg);
  border-color: rgba(134, 168, 255, 0.12);
}

.console-pulse {
  inset: 22%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.3), transparent 22%),
    radial-gradient(circle at 35% 40%, rgba(119, 242, 215, 0.46), transparent 44%),
    radial-gradient(circle at 70% 55%, rgba(134, 168, 255, 0.42), transparent 44%);
  filter: blur(6px);
  animation: pulseGlow 5s ease-in-out infinite;
}

.console-center {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 28px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(119, 242, 215, 0.88), rgba(134, 168, 255, 0.84));
  color: #04101c;
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.04),
    0 0 0 13px rgba(255, 255, 255, 0.02),
    0 24px 60px rgba(119, 242, 215, 0.16);
  transition: box-shadow 0.4s ease;
}

.console-center:hover {
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.06),
    0 0 0 13px rgba(255, 255, 255, 0.03),
    0 24px 60px rgba(119, 242, 215, 0.24);
}

.console-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.console-stats div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}

.console-stats div:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.console-stats strong {
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.console-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.floating-badge {
  position: absolute;
  right: -10px;
  bottom: 18px;
  padding: 16px 18px;
  max-width: 180px;
  border-radius: 18px;
  background: rgba(5, 8, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.floating-badge small {
  display: block;
  color: rgba(243, 246, 255, 0.48);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.floating-badge strong {
  display: block;
  margin-top: 8px;
  line-height: 1.4;
  font-size: 0.92rem;
}

/* ─── Hero Marquee ─── */
.hero-marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  overflow: hidden;
  opacity: 0.5;
}

.hero-marquee div {
  display: flex;
  gap: 28px;
  min-width: max-content;
  padding-left: 28px;
  animation: marquee 22s linear infinite;
}

.hero-marquee span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  color: rgba(243, 246, 255, 0.32);
  padding: 0 4px;
}

/* ─── Section Common ─── */
.section {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 22px auto 0;
  padding: 52px 0 24px;
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent-alt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-heading p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.88;
  font-size: 1rem;
}

/* ─── About / Story ─── */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 22px;
  margin-top: 32px;
}

.story-feature,
.mini-panel,
.stage-panel,
.note-card,
.guestbook-form,
.guestbook-feed,
.cta-panel {
  background: var(--glass-bg);
  border: var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.story-feature {
  padding: 34px;
  border-radius: 32px;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

.story-feature::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  animation: shimmer 8s ease-in-out infinite;
  pointer-events: none;
}

.story-feature h3,
.mini-panel h3,
.feed-head h3 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.2;
}

.story-feature h3 {
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feed-head h3 {
  background: linear-gradient(135deg, var(--text), var(--accent-warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.story-feature p,
.mini-panel p,
.note-card p,
.cta-panel p,
.message-card p {
  color: var(--muted);
  line-height: 1.8;
}

.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.story-tags li {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.story-tags li:hover {
  border-color: rgba(119, 242, 215, 0.2);
  background: rgba(119, 242, 215, 0.06);
  color: var(--accent);
}

.story-stack {
  display: grid;
  gap: 18px;
}

.mini-panel,
.note-card {
  padding: 24px 24px 22px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    transform 0.3s var(--ease-spring),
    box-shadow 0.3s ease;
}

.mini-panel:hover,
.note-card:hover {
  box-shadow: var(--shadow), var(--shadow-glow);
}

.mini-panel::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 28px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent-alt);
  opacity: 0.3;
  transition: opacity 0.3s ease, width 0.3s ease;
}

.mini-panel:hover::after {
  opacity: 0.7;
  width: 44px;
}

.mini-panel .story-label,
.note-card .story-label {
  position: relative;
  z-index: 1;
}

/* ─── Experience / Immersion ─── */
.immersion {
  padding-top: 84px;
}

.immersive-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  gap: 22px;
  margin-top: 32px;
}

.stage-panel {
  padding: 22px;
  border-radius: 34px;
}

.stage-panel-head span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}

.stage-panel-head span:first-child {
  color: var(--accent);
  font-weight: 500;
}

.stage-panel-head span:last-child {
  color: rgba(243, 246, 255, 0.4);
  font-size: 0.82rem;
}

.stage-screen {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  margin-top: 18px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(4, 7, 18, 0.76), rgba(5, 8, 22, 0.96)),
    radial-gradient(circle at 30% 24%, rgba(119, 242, 215, 0.12), transparent 26%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.screen-layer {
  position: absolute;
  inset: 10%;
  border-radius: 26px;
  will-change: transform;
}

.screen-layer-back {
  inset: 14% 10%;
  background:
    radial-gradient(circle at 30% 36%, rgba(119, 242, 215, 0.3), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.screen-layer-middle {
  inset: 24% 18% 20%;
  border: 1px solid rgba(134, 168, 255, 0.22);
  background: linear-gradient(180deg, rgba(134, 168, 255, 0.18), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 60px rgba(134, 168, 255, 0.1);
}

.screen-layer-front {
  inset: 48% 12% 10%;
  border: 1px solid rgba(255, 154, 98, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 154, 98, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.02);
}

.screen-focus {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
}

.screen-focus span {
  display: block;
  color: rgba(243, 246, 255, 0.68);
  letter-spacing: 0.2em;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
}

.screen-focus strong {
  display: block;
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stage-notes {
  display: grid;
  gap: 18px;
  align-self: end;
}

.note-card strong {
  display: block;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--text), var(--accent-alt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.note-card:nth-child(1) { --note-accent: var(--accent); }
.note-card:nth-child(2) { --note-accent: var(--accent-alt); }
.note-card:nth-child(3) { --note-accent: var(--accent-warm); }

.note-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 32px;
  height: 2px;
  border-radius: 1px;
  background: var(--note-accent, var(--accent));
  opacity: 0.4;
  transition: opacity 0.3s ease, width 0.3s ease;
}

.note-card:hover::after {
  opacity: 0.8;
  width: 48px;
}

/* ─── Gallery ─── */
.gallery {
  padding-top: 92px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  grid-column: span 4;
  min-height: 360px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  transition:
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

.gallery-card:hover {
  border-color: rgba(119, 242, 215, 0.15);
  box-shadow: var(--shadow), 0 0 40px rgba(119, 242, 215, 0.06);
}

.gallery-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo), filter 0.6s ease;
}

.gallery-card:hover img {
  transform: scale(1.06);
  filter: brightness(1.1);
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 60%;
  background: linear-gradient(180deg, transparent, rgba(4, 7, 18, 0.92));
  pointer-events: none;
}

.gallery-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(119, 242, 215, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.gallery-card:hover::before {
  opacity: 1;
}

.gallery-card figcaption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 2;
  transition: transform 0.4s var(--ease-out-expo);
}

.gallery-card:hover figcaption {
  transform: translateY(-4px);
}

.gallery-card strong {
  display: block;
  font-size: 1.28rem;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--text), rgba(243, 246, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: filter 0.3s ease;
}

.gallery-card:hover strong {
  filter: drop-shadow(0 0 8px rgba(119, 242, 215, 0.2));
}

.gallery-card span {
  display: block;
  margin-top: 6px;
  color: rgba(243, 246, 255, 0.64);
  font-size: 0.88rem;
  line-height: 1.5;
}

.gallery-card-xl {
  grid-column: span 7;
  min-height: 480px;
}

.gallery-card-wide {
  grid-column: span 5;
}

/* ─── Guestbook ─── */
.guestbook {
  padding-top: 86px;
}

.guestbook-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 22px;
  margin-top: 32px;
}

.guestbook-form,
.guestbook-feed,
.cta-panel {
  padding: 28px;
  border-radius: 30px;
}

.guestbook-form label {
  display: block;
  margin: 20px 0 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(243, 246, 255, 0.78);
  letter-spacing: 0.02em;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s var(--ease-spring);
}

.guestbook-form input::placeholder,
.guestbook-form textarea::placeholder {
  color: rgba(243, 246, 255, 0.3);
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: rgba(119, 242, 215, 0.6);
  background: rgba(119, 242, 215, 0.04);
  box-shadow: 0 0 0 3px rgba(119, 242, 215, 0.08), 0 4px 16px rgba(119, 242, 215, 0.06);
  transform: translateY(-1px);
}

.guestbook-form textarea {
  resize: vertical;
  min-height: 136px;
}

.guestbook-form .button {
  width: 100%;
  margin-top: 24px;
  cursor: pointer;
  position: relative;
}

.guestbook-form .button::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(4, 16, 28, 0.3);
  box-shadow: 6px 0 0 rgba(4, 16, 28, 0.3), 12px 0 0 rgba(4, 16, 28, 0.3);
}

.form-tip {
  margin-top: 14px;
  font-size: 0.84rem;
  color: rgba(243, 246, 255, 0.42);
  line-height: 1.6;
}

.feed-count {
  font-size: 0.88rem;
  color: rgba(243, 246, 255, 0.48);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feed-count::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(119, 242, 215, 0.4);
  animation: blink 2.5s ease-in-out infinite;
}

.message-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.message-card {
  position: relative;
  padding: 20px 20px 18px;
  min-height: 170px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--glass-bg);
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    transform 0.3s var(--ease-spring),
    box-shadow 0.3s ease;
}

.message-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.message-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--message-accent, var(--accent));
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 12px var(--message-accent, var(--accent));
}

.message-card strong {
  font-size: 1.02rem;
  background: linear-gradient(135deg, var(--text), rgba(243, 246, 255, 0.85));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.message-role,
.message-time {
  display: inline-flex;
  margin-top: 6px;
  color: rgba(243, 246, 255, 0.48);
  font-size: 0.82rem;
}

.message-role {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  margin-left: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.message-time {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.02em;
}

.message-card p {
  margin: 14px 0 0;
  font-size: 0.94rem;
  line-height: 1.7;
}

/* ─── CTA ─── */
.cta {
  padding-top: 90px;
  padding-bottom: 70px;
}

.cta-panel {
  position: relative;
  overflow: hidden;
  max-width: 980px;
}

.cta-panel::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(119, 242, 215, 0.18), transparent 62%);
  pointer-events: none;
}

.cta-panel::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  left: -80px;
  bottom: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(134, 168, 255, 0.12), transparent 62%);
  pointer-events: none;
}

.cta-panel h2 {
  margin: 0;
  max-width: 12ch;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Footer ─── */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding-top: 6px;
  color: rgba(243, 246, 255, 0.52);
}

.footer-brand {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.16em;
  background: linear-gradient(135deg, var(--text), var(--accent-alt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: rgba(243, 246, 255, 0.42);
  letter-spacing: 0.02em;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.footer-meta a {
  transition: color 0.25s ease;
}

.footer-meta a:hover {
  color: var(--accent);
}

.site-beian {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto 38px;
  padding: 14px 0 18px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(243, 246, 255, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.beian-inner {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.site-beian a {
  color: rgba(243, 246, 255, 0.4);
  transition: color 0.25s ease;
}

.site-beian a:hover {
  color: var(--accent);
}

.beian-divider {
  margin: 0 10px;
  opacity: 0.25;
}

/* ─── Reveal Animation ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease-out-expo),
    transform 0.7s var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal for children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s var(--ease-out-expo),
    transform 0.6s var(--ease-out-expo);
}

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.4s; }

/* ─── Tilt Surface ─── */
.tilt-surface {
  transform-style: preserve-3d;
  transition: transform 0.2s ease, border-color 0.3s ease;
}

.tilt-surface:hover {
  border-color: rgba(119, 242, 215, 0.18);
}

/* ─── Keyframes ─── */
@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.88;
  }

  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes shimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(119, 242, 215, 0.1); }
  50% { box-shadow: 0 0 30px rgba(119, 242, 215, 0.2); }
}

/* ─── Responsive: 1080px ─── */
@media (max-width: 1080px) {
  .topbar {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 28px;
  }

  .hero-inner,
  .story-grid,
  .immersive-stage,
  .guestbook-layout {
    grid-template-columns: 1fr;
  }

  .hero-title {
    max-width: none;
  }

  .hero-console {
    max-width: 560px;
  }

  .gallery-card,
  .gallery-card-xl,
  .gallery-card-wide {
    grid-column: span 6;
  }
}

/* ─── Responsive: 760px ─── */
@media (max-width: 760px) {
  .topbar {
    position: relative;
    top: 0;
    gap: 14px;
    padding: 18px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    width: min(calc(100% - 20px), 1260px);
    padding: 104px 0 88px;
    border-radius: 28px;
  }

  .hero-inner,
  .section,
  .footer {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .hero-inner {
    gap: 34px;
  }

  .hero-metrics,
  .console-stats,
  .message-grid {
    grid-template-columns: 1fr;
  }

  .hero-welcome {
    min-height: 80px;
  }

  .cheung-timeline {
    flex-direction: column;
  }

  .section {
    padding-top: 34px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card,
  .gallery-card-xl,
  .gallery-card-wide {
    grid-column: auto;
    min-height: 320px;
  }

  .guestbook-form,
  .guestbook-feed,
  .story-feature,
  .mini-panel,
  .stage-panel,
  .note-card,
  .cta-panel {
    padding: 22px;
    border-radius: 24px;
  }

  .stage-screen {
    min-height: 400px;
  }

  .footer,
  .footer-meta {
    align-items: flex-start;
    text-align: left;
  }

  .footer {
    flex-direction: column;
  }

  .site-beian {
    width: min(calc(100% - 20px), var(--max-width));
    font-size: 0.78rem;
  }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
