/* ============================================================
   Liangzhu — homepage rebuild
   Original stylesheet written from scratch.
   ============================================================ */

@font-face {
  font-family: "tiktok";
  src: url("../assets/fonts/TikTokSans.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 75% 150%;
  font-display: swap;
}
@font-face {
  font-family: "mono";
  src: url("../assets/fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "tronica-mono";
  src: url("../assets/fonts/GeistMono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --sans: "tiktok", "TikTok Sans", "PingFang SC", "Noto Sans SC", sans-serif;
  --mono: "mono", "PingFang SC", monospace;
  --mono-2: "tronica-mono", monospace;
  --pad-x: 56px;
  --header-h: 0px;
}

html[data-mode="light"] {
  --background-1: rgb(251, 250, 244);
  --label: 0, 0, 0;
  --label-d: 54, 54, 48;
}
html[data-mode="dark"] {
  --background-1: rgb(15, 17, 17);
  --label: 255, 255, 255;
  --label-d: 230, 232, 232;
}
html {
  --label-1: rgba(var(--label), 1);
  --label-2: rgba(var(--label-d), 0.6);
  --label-3: rgba(var(--label-d), 0.32);
  --line: rgba(var(--label-d), 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--sans);
  background: var(--background-1);
  color: var(--label-1);
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

a { color: inherit; }
button { font: inherit; color: inherit; }

.site-shell { height: 100%; position: relative; }

/* ---------------------------------------------------------- */
/* Fixed scene canvas                                          */
/* ---------------------------------------------------------- */
.scene-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #101630;
}
.scene-canvas canvas { display: block; }

/* ---------------------------------------------------------- */
/* Page grid overlay                                           */
/* ---------------------------------------------------------- */
.page-grid {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  color: var(--line);
  opacity: 0.12;
  transition: color 0.5s ease;
}
.page-grid.warp-grid { color: rgba(230, 232, 232, 0.1); }
.grid-vertical {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: currentColor;
}
.grid-horizontal {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
}
.grid-v-0 { left: var(--pad-x); }
.grid-v-1 { left: calc(var(--pad-x) + (100vw - var(--pad-x) * 2) / 3); }
.grid-v-2 { left: calc(var(--pad-x) + (100vw - var(--pad-x) * 2) * 2 / 3); }
.grid-v-3 { left: calc(100% - var(--pad-x)); }
.grid-h-0 { top: 33.3333%; }
.grid-h-1 { top: 68.3333%; }
.grid-cross {
  position: absolute;
  width: 25px;
  height: 25px;
  transform: translate(-12px, -12px);
  display: grid;
  place-items: center;
}
.grid-cross::before {
  content: "";
  position: absolute;
  height: 1px;
  width: 11px;
  background: currentColor;
}
.grid-cross::after {
  content: "";
  position: absolute;
  height: 11px;
  width: 1px;
  background: currentColor;
}


/* ---------------------------------------------------------- */
/* Header                                                      */
/* ---------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  color: var(--label-1);
  background: transparent;
  pointer-events: none;
  transition: color 0.4s ease;
}
.site-header .header-top {
  pointer-events: auto;
}
.site-header.is-warp { color: #fff; }
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px var(--pad-x);
}
.header-brand {
  font-weight: 700;
  font-variation-settings: "wght" 700, "wdth" 120;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 4px;
  border: 0;
  background: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: inherit;
  cursor: pointer;
}
.header-control:hover { opacity: 0.8; }
.mode-icon { display: inline-flex; }
html[data-mode="dark"] .mode-icon-sun { display: none; }
html[data-mode="light"] .mode-icon-moon { display: none; }

/* ---------------------------------------------------------- */
/* Fixed corner marks: China (GMT+8) in original font          */
/* ---------------------------------------------------------- */
.globe-clock {
  position: fixed;
  left: var(--pad-x);
  bottom: 26px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--label-1);
  pointer-events: none;
  transition: color 0.4s ease;
}
.globe-clock .globe-icon {
  flex-shrink: 0;
}
.globe-clock .clock-label {
  letter-spacing: 0.08em;
}
.globe-clock .clock-time {
  letter-spacing: 0.08em;
}
.globe-clock.is-warp { color: #fff; }
.scroll-top {
  position: fixed;
  right: var(--pad-x);
  bottom: 18px;
  z-index: 20;
  padding: 8px;
  border: 0;
  background: none;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  font-variation-settings: "wdth" 120;
  letter-spacing: 0.12em;
  color: var(--label-1);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s, color 0.4s ease;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.scroll-top.is-warp { color: #fff; }

/* ---------------------------------------------------------- */
/* Scroll container                                            */
/* ---------------------------------------------------------- */
.site-scroll {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.site-scroll::-webkit-scrollbar { display: none; }

main { display: block; }

.eyebrow {
  display: block;
  font: 13px/1.5 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label-2);
  margin-bottom: 20px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--label-1);
  text-decoration: none;
  cursor: pointer;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid var(--label-1);
  border-radius: 8px;
  background: var(--label-1);
  color: var(--background-1);
  font: 500 15px/1.4 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.action-button:hover {
  background: transparent;
  color: var(--label-1);
}
.action-button span[aria-hidden] { transition: transform 0.2s; }
.action-button:hover span[aria-hidden] { transform: translate(2px, -2px); }

/* ---------------------------------------------------------- */
/* Hero                                                        */
/* ---------------------------------------------------------- */
.home-hero {
  height: 100svh;
  padding: 96px var(--pad-x);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  position: relative;
}
.hero-intro {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
}
.hero-role {
  grid-column: 1 / span 3;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.hero-philosophy {
  grid-column: 5 / span 3;
  max-width: 250px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--label-1);
  text-wrap: balance;
}
.hero-bio { 
  grid-column: 9 / span 4; 
  font-family: var(--sans);
  font-size: 15px; 
  line-height: 1.6;
  color: var(--label-2);
}
.hero-headline {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  font-size: 5.6vw;
  font-weight: 700;
  font-variation-settings: "wdth" 120;
  line-height: 1.04;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 0;
  max-width: calc(100vw - 380px);
}
.hero-actions {
  position: absolute;
  right: 64px;
  bottom: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  max-width: 290px;
}
.hero-actions .action-button { width: 100%; }
.hero-secondary { font-size: 14px; }

/* ---------------------------------------------------------- */
/* Scroll Down Indicator (Clean text + bouncing arrow, no bg)  */
/* ---------------------------------------------------------- */
.hero-scroll-indicator {
  position: absolute;
  right: var(--pad-x);
  bottom: 40px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  background: none;
  border: none;
  color: var(--label-1);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.82;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}
.hero-scroll-indicator:hover {
  opacity: 1;
  transform: translateY(3px);
}
.scroll-arrow {
  display: inline-block;
  animation: arrow-bounce 1.6s infinite ease-in-out;
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------------------------------------------------------- */
/* Scene transition                                            */
/* ---------------------------------------------------------- */
.scene-transition {
  height: 100svh;
  position: relative;
  pointer-events: none;
}
.transition-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9%;
  margin: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.is-scene-transition .transition-caption { opacity: 1; }

/* ---------------------------------------------------------- */
/* About                                                       */
/* ---------------------------------------------------------- */
.home-about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  padding: 96px var(--pad-x) 112px;
  align-items: start;
}
.portrait {
  position: relative;
  grid-column: 1 / span 3;
  padding: 8px;
  margin: 0;
  align-self: start;
}
.portrait-picture {
  aspect-ratio: 1;
  overflow: hidden;
}
.portrait-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait figcaption {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--label-2);
}
.about-copy {
  grid-column: 5 / span 8;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px;
}
.about-copy h2 {
  margin: 0;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 17em;
}
.about-copy p {
  margin: 0;
  font-size: 16px;
  line-height: 1.85;
  max-width: 34em;
  color: var(--label-1);
  opacity: 0.8;
  text-wrap: pretty;
}
.about-reading-actions {
  display: flex;
  gap: 28px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.about-copy .text-link { align-self: center; }

/* ---------------------------------------------------------- */
/* Services                                                    */
/* ---------------------------------------------------------- */
.home-services { padding: 40px var(--pad-x) 112px; }
.section-intro { margin-bottom: 52px; max-width: 560px; }
.section-intro h2 {
  margin: 0 0 18px;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.section-intro p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--label-2);
  max-width: 30em;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.service-card { display: flex; }
.service-card-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
.service-art {
  --motion-bg: #e8f0f3;
  width: 100%;
  aspect-ratio: 1.2;
  display: grid;
  place-items: center;
  background: var(--motion-bg);
  overflow: hidden;
  margin-bottom: 26px;
  position: relative;
}
html[data-mode="dark"] .service-consulting .service-art { --motion-bg: #172439; }
html[data-mode="dark"] .service-training .service-art { --motion-bg: #192235; }
html[data-mode="dark"] .service-fde .service-art { --motion-bg: #1d2b28; }
.service-art img {
  width: 76%;
  height: 76%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  transition: opacity 0.2s;
}
.service-art.motion-ready { background: transparent; }
.service-art.motion-ready img { opacity: 0; }
.motion-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #101410;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s 0.14s, transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 3;
}
.motion-copy span {
  font: 11px/1.5 var(--mono);
  letter-spacing: 0.08em;
}
.motion-copy strong { font-size: 15px; line-height: 1.45; }
.service-art[data-motion-hover="true"] .motion-copy { opacity: 1; transform: none; }
.service-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.service-card-heading h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.service-card-heading span { font-size: 20px; }
.service-card > .service-card-link > p {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--label-2);
}
.service-deliverable {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  font-size: 14px;
  line-height: 1.5;
  margin: auto 0 25px;
  color: var(--label-2);
}
.service-card .text-link { margin-top: auto; }

/* ---------------------------------------------------------- */
/* Content & learning                                          */
/* ---------------------------------------------------------- */
.home-content {
  padding: 90px 5vw 120px;
  background: var(--background-1);
  position: relative;
  transition: background 0.35s ease;
}
.content-title {
  margin: 0 0 64px;
  font-size: clamp(30px, 3.1vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.content-links-compact {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px 4vw;
  align-items: start;
}
.content-entry {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.content-entry:hover { transform: translateY(-7px) rotate(-1deg); }
.content-entry:nth-child(2n):hover { transform: translateY(-7px) rotate(1deg); }
.content-links-compact .content-entry:nth-child(1) { grid-column: 1 / span 7; }
.content-links-compact .content-entry:nth-child(2) { grid-column: 9 / span 4; margin-top: 115px; }
.content-links-compact .content-entry:nth-child(3) { grid-column: 2 / span 4; margin-top: -20px; }
.content-links-compact .content-entry:nth-child(4) { grid-column: 7 / span 6; margin-top: 85px; }
.content-entry-index {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 2;
  padding: 4px 8px;
  font: 11px/1.5 var(--mono);
  background: rgba(251, 250, 244, 0.85);
  color: #363630;
}
.content-entry-art { margin: 0; }
.content-entry-art img {
  display: block;
  width: 100%;
  height: auto;
}
.content-entry-copy h3 {
  margin: 22px 0 10px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.content-entry-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--label-2);
  max-width: 24em;
}
.content-entry-arrow {
  position: absolute;
  right: 4px;
  bottom: 4px;
  font-size: 18px;
  transition: transform 0.3s;
}
.content-entry:hover .content-entry-arrow { transform: translate(3px, -3px); }

/* ---------------------------------------------------------- */
/* Warp                                                        */
/* ---------------------------------------------------------- */
.home-warp {
  height: 800svh;
  position: relative;
  pointer-events: none;
}
.warp-sticky {
  height: 100svh;
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
}
.warp-heading {
  position: absolute;
  margin: 0;
  display: flex;
  flex-direction: column;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  font-variation-settings: "wdth" 120;
  font-size: 6.8vw;
  font-kerning: none;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.5s, transform 0.8s;
  transform: translateY(16px);
}
.warp-heading.visible { opacity: 1; transform: none; }
.warp-flight {
  position: absolute;
  inset: 0;
  perspective: 1000px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  pointer-events: none;
}
.warp-flight-card {
  position: absolute;
  left: 18%;
  top: 31%;
  width: clamp(155px, 23vw, 290px);
  height: clamp(160px, 26svh, 220px);
  transform: translate(-50%, -50%)
    translate3d(var(--flight-x, 0px), var(--flight-y, 0px), var(--flight-z, -1600px))
    rotate(var(--flight-turn, 0deg))
    rotateX(var(--flight-tilt, -25deg));
  opacity: var(--flight-opacity, 0);
  backface-visibility: hidden;
  will-change: transform, opacity;
  pointer-events: none;
}
.flight-0 { left: 18%; top: 26%; }
.flight-1 { left: 72%; top: 33%; }
.flight-2 { left: 18%; top: 74%; }
.flight-3 { left: 82%; top: 74%; }
.warp-flight-paper {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 28px;
  border: 1px solid rgba(234, 248, 255, 0.61);
  border-radius: 42px 15px 55px 19px;
  background: linear-gradient(135deg, rgba(230, 245, 255, 0.93), rgba(185, 216, 238, 0.9) 60%, rgba(154, 194, 232, 0.88));
  color: #16354b;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.125), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  overflow: hidden;
}
.warp-flight-card[data-flight-arrived="true"] .warp-flight-paper {
  animation: paper-float 6s ease-in-out infinite;
}
@keyframes paper-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(-0.6deg); }
}
.method-note-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0.55;
  margin-bottom: 18px;
}
.warp-flight-card h3 {
  font-size: clamp(19px, 2.15vw, 29px);
  line-height: 1.25;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}
.warp-flight-card p {
  font-size: clamp(15px, 1.6vw, 21px);
  line-height: 1.4;
  margin: 0;
}

/* ---------------------------------------------------------- */
/* Contact / footer                                            */
/* ---------------------------------------------------------- */
.home-contact {
  height: 100svh;
  min-height: 720px;
  padding: 96px var(--pad-x) 216px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-headline {
  position: absolute;
  left: var(--pad-x);
  top: 22%;
  width: 42%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08em;
  font-size: clamp(28px, 3.1vw, 54px);
  line-height: 1.28;
  font-weight: 700;
  font-variation-settings: "wdth" 120;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
:lang(zh) .contact-headline { font-weight: 700; }
.contact-bottom {
  position: absolute;
  bottom: 100px;
  left: var(--pad-x);
  right: var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.contact-bottom p {
  max-width: 430px;
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 26px;
  opacity: 0.85;
}
.contact-cta { min-width: 200px; }
.home-contact-channel {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  flex-shrink: 0;
}
.contact-wechat { margin: 0; text-align: center; }
.contact-wechat img {
  display: block;
  width: 152px;
  height: 152px;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
  object-fit: contain;
}
.contact-wechat figcaption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--label-2);
}
.contact-social {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-end;
  white-space: nowrap;
  font-size: 14px;
}
.contact-social a { text-decoration: none; }
.contact-social a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-social .source-credit { font-size: 11px; color: var(--label-2); }
.footer-nav {
  position: absolute;
  bottom: 92px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 28px;
}
.footer-nav a {
  font-size: 13px;
  text-decoration: none;
  opacity: 0.9;
}
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-copyright {
  position: absolute;
  bottom: 40px;
  left: var(--pad-x);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------- */
/* Reveal animations                                           */
/* ---------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
}
.is-loaded [data-reveal] {
  animation: hero-reveal 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes hero-reveal {
  to { opacity: 1; transform: none; }
}
[data-spatial-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease var(--spatial-delay, 0ms), transform 0.7s cubic-bezier(0.2, 0.75, 0.2, 1) var(--spatial-delay, 0ms);
}
[data-spatial-reveal].spatial-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-spatial-reveal] { opacity: 1; transform: none; animation: none !important; transition: none !important; }
  .warp-flight-card[data-flight-arrived="true"] .warp-flight-paper { animation: none !important; }
}

/* ---------------------------------------------------------- */
/* Responsive                                                  */
/* ---------------------------------------------------------- */
@media (max-width: 1180px) {
  :root { --pad-x: 32px; }
  .hero-headline { max-width: calc(100vw - 300px); }
  .hero-role { font-size: 25px; }
  .hero-philosophy { grid-column: 5 / span 3; font-size: 14px; }
  .hero-bio { grid-column: 9 / span 4; font-size: 14px; }
  .header-nav { gap: 16px; }
}

@media (max-width: 1024px) {
  .page-grid {
    display: none !important;
  }
  .home-hero {
    height: 100svh;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(100px, 14vh, 130px) 20px clamp(72px, 10vh, 90px);
    box-sizing: border-box;
  }
  .hero-headline {
    font-size: clamp(32px, 8.2vw, 48px);
    max-width: 100%;
    line-height: 1.06;
    margin: 0;
    align-self: flex-start;
  }
  .hero-intro { display: flex; flex-direction: column; gap: 14px; }
  .hero-actions { right: 40px; bottom: 90px; }
  .home-about { padding: 72px 16px; }
  .portrait { grid-column: 1 / span 4; }
  .about-copy { grid-column: 6 / span 7; }
  .home-services { padding: 40px 16px 96px; }
  .service-grid { gap: 22px; }
  .service-art { aspect-ratio: 1; }
  .content-links-compact { gap: 32px 3vw; }
  .flight-1 { left: 74%; }
  .flight-3 { left: 80%; }
}

/* ============================================================
   Loading Screen (first visit / assets loading)
   ============================================================ */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--background-1, #0f1111);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
  pointer-events: all;
}

.site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-monogram {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--label-1);
  opacity: 1;
}

.loader-bar {
  width: 130px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loader-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  background: #3b82f6;
  border-radius: 2px;
  animation: loader-slide 0.9s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes loader-slide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ============================================================
   LeonW custom styles: Portrait, verified badge, socials grid
   ============================================================ */

.portrait-picture {
  position: relative;
  display: inline-block;
}

.portrait-picture img:first-child {
  display: block;
  border-radius: 28px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
  pointer-events: auto;
}

.inline-verified {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}

.about-handle {
  font-size: 15px;
  font-weight: 600;
  color: var(--label-2);
  margin: 0 0 16px;
}

.about-handle a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.85;
}

.about-handle a:hover {
  opacity: 1;
}

.socials-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.socials-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.socials-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

html[data-mode="light"] .social-pill {
  background: rgba(0, 0, 0, 0.04);
}

.social-pill:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

html[data-mode="light"] .social-pill:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

.social-pill-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.social-pill-icon-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

html[data-mode="dark"] .invert-icon {
  filter: brightness(0) invert(1);
}

html[data-mode="light"] .invert-icon {
  filter: brightness(0);
}

/* Hide corner buttons and copyright */
.scroll-top,
.footer-copyright {
  display: none !important;
}

/* ============================================================
   Enhanced Mobile UI (Phones & small screens)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --pad-x: 20px;
  }

  .site-header {
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .header-top {
    padding: 14px 20px;
  }
  .header-brand {
    font-size: 15px;
    font-weight: 700;
  }
  .header-control {
    font-size: 13px;
    padding: 6px 10px;
  }

  /* China Clock on Mobile: clean original font */
  .globe-clock {
    display: flex !important;
    left: 20px;
    bottom: 20px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  /* Hero Section on Mobile: Headline middle-up, Intro & Scroll Down lifted from bottom */
  .home-hero {
    height: 100svh;
    min-height: 580px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(112px, 15vh, 142px) 20px clamp(78px, 10.5vh, 96px);
    box-sizing: border-box;
  }

  .hero-headline {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: clamp(30px, 8.6vw, 44px);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    max-width: 100%;
    padding: 0;
  }

  .hero-intro {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: var(--sans);
    margin-top: auto;
    padding-bottom: 12px;
  }

  .hero-role {
    display: inline-block;
    align-self: flex-start;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
    border-radius: 9999px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--label-1);
  }
  html[data-mode="light"] .hero-role {
    background: rgba(0, 0, 0, 0.05);
  }

  .hero-philosophy {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--label-1);
    max-width: 100%;
    margin: 0;
  }

  .hero-bio {
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--label-2);
    margin: 0;
  }

  .hero-scroll-indicator {
    order: 3;
    position: relative;
    right: auto;
    bottom: auto;
    align-self: flex-start;
    margin-top: 4px;
    padding: 6px 0;
    font-size: 11px;
    gap: 6px;
    background: none;
    border: none;
  }

  /* Transition 3D hello spacer */
  .scene-transition {
    padding: 24px 18px;
    min-height: 120px;
    height: 40svh;
  }

  .transition-caption {
    font-size: 11px;
    letter-spacing: 0.12em;
    font-family: var(--mono);
  }

  /* About section on phones */
  .home-about {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 40px 18px 90px;
  }

  .portrait {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    text-align: center;
  }

  .portrait-picture {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  html[data-mode="light"] .portrait-picture {
    border-color: rgba(0, 0, 0, 0.08);
  }

  .portrait-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -moz-user-select: none;
  }

  .portrait figcaption {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--label-2);
  }

  .about-copy {
    width: 100%;
    text-align: left;
  }

  .about-copy .eyebrow {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--mono);
    color: var(--label-2);
  }

  .about-copy h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(24px, 6.5vw, 30px);
    font-weight: 800;
    line-height: 1.2;
    margin: 8px 0 6px;
    letter-spacing: -0.02em;
  }

  .about-handle {
    font-size: 14px;
    font-weight: 600;
    color: var(--label-2);
    margin: 0 0 14px;
  }
  .about-handle a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .about-copy p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--label-2);
    margin: 0 0 12px;
  }

  /* Social pills on mobile */
  .socials-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }

  .socials-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    font-family: var(--mono);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .socials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .social-pill {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    justify-content: flex-start;
    min-height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    backdrop-filter: blur(10px);
  }
  html[data-mode="light"] .social-pill {
    background: rgba(0, 0, 0, 0.04);
  }

  .social-pill:active {
    transform: scale(0.97);
  }

  .scroll-top,
  .footer-copyright {
    display: none !important;
  }

  .grid-v-1, .grid-v-2, .grid-horizontal, .grid-cross {
    display: none;
  }
  .grid-v-0 { left: 10px; opacity: 0.25; }
  .grid-v-3 { left: calc(100% - 10px); opacity: 0.25; }
}

@media (max-width: 360px) {
  .socials-grid {
    grid-template-columns: 1fr;
  }
}


