/* Spatial hero: a wide rear scene with independent foreground typography. */
:root { --hero-paper: #f8f6f2; }
:root[data-theme="paper"] { --hero-paper: #f4f1ea; }
:root[data-theme="dark"] { --hero-paper: #13151a; }

.topbar { height: 72px; padding-inline: clamp(24px, 3.8vw, 72px); background: color-mix(in srgb, var(--hero-paper) 92%, transparent); }
.brand-mark { font-size: 21px; }
.brand-caret { font-size: 17px; }
.brand-subtitle, .top-actions > a, #themeToggle [data-role], #langToggle [data-icon] { display: none; }
.brand .brand-mark { animation: none; background: none; color: var(--ink); -webkit-text-fill-color: currentColor; }
.nav-tabs { gap: 20px; }
.nav-tab { height: 42px; font-size: 15px; color: var(--ink-2); }
.nav-tab.is-active::after { height: 2px; bottom: 0; }
.top-actions { gap: 12px; }
#themeToggle { min-width: 40px; min-height: 40px; padding: 0; }
#themeToggle .icon { width: 23px; height: 23px; }
#langToggle { min-width: 46px; min-height: 40px; border-radius: 0; border-left: 1px solid var(--line-2); padding-left: 20px; font-size: 14px; }
.sec { scroll-margin-top: 72px; }
.sec-hero { padding-top: 0; background: var(--hero-paper); }
.home-hero {
  display: block;
  position: relative;
  max-width: 1800px;
  min-height: calc(100svh - 72px);
  padding: 0 clamp(24px, 3.8vw, 72px);
  margin-inline: auto;
  overflow: clip;
  isolation: isolate;
  perspective: 1600px;
}
.hero-copy {
  position: relative;
  z-index: 6;
  width: 58%;
  max-width: 840px;
  padding-top: clamp(112px, 9vw, 152px);
  transform: translate3d(var(--copy-x, 0px), var(--copy-y, 0px), 35px);
  pointer-events: none;
}
/* A feathered optical veil keeps the rear geometry visible underneath the type. */
.hero-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 30px -62px -38px -100px;
  background: color-mix(in srgb, var(--hero-paper) 48%, transparent);
  backdrop-filter: blur(7px);
  mask-image: radial-gradient(ellipse at 38% 42%, #000 30%, transparent 74%);
  pointer-events: none;
}
.hero-copy .eyebrow { font-size: clamp(10px, .87vw, 14px); letter-spacing: .11em; margin-bottom: 23px; white-space: nowrap; }
.hero-copy h1 { font-size: clamp(50px, 4.8vw, 76px); line-height: 1.23; font-weight: 600; letter-spacing: -.035em; white-space: nowrap; text-shadow: 0 2px 0 color-mix(in srgb, var(--hero-paper) 80%, transparent), 0 12px 32px color-mix(in srgb, var(--hero-paper) 85%, transparent), 0 22px 40px color-mix(in srgb, var(--ink) 8%, transparent); }
:lang(zh-CN) .hero-copy h1 { font-size: clamp(52px, 5vw, 80px); line-height: 1.25; letter-spacing: -.025em; font-weight: 600; }
.hero-copy h1 .hero-line { display: block; }
.hero-copy h1 .hw, .hero-copy h1 em { display: inline; }
.hero-copy h1 em { color: #c9532f; }
:root[data-theme="dark"] .hero-copy h1 em { color: #f09262; }
.hero-lead { max-width: 545px; margin-top: 25px; font-size: clamp(16px, 1.27vw, 20px); line-height: 1.75; letter-spacing: .004em; color: color-mix(in srgb, var(--ink) 80%, var(--ink-2)); text-shadow: 0 2px 8px var(--hero-paper); }
.hero-actions { margin-top: 28px; gap: 18px; pointer-events: auto; }
.hero-actions .command-button { min-width: 136px; height: 54px; border-radius: 6px; font-size: 17px; padding-inline: 25px; box-shadow: 0 12px 26px color-mix(in srgb, var(--hero-paper) 70%, transparent); }
.hero-actions .command-button.primary { background: #181a1e; color: #fff; border-color: #181a1e; }
.hero-actions .command-button.primary::before { display: none; }
.hero-actions .command-button.ghost { background: color-mix(in srgb, var(--hero-paper) 80%, transparent); backdrop-filter: blur(8px); }
:root[data-theme="dark"] .hero-actions .command-button.primary { background: var(--ink); color: #16181c; border-color: var(--ink); }
.hero-actions .command-button .icon { width: 20px; height: 20px; }
.hero-scene, .hero-overlay {
  position: absolute;
  z-index: 1;
  width: min(75%, calc((100svh - 112px) * 1.536));
  top: 28px;
  right: 4%;
  margin: 0;
  perspective: 1500px;
  container-type: inline-size;
}
.hero-overlay { z-index: 7; aspect-ratio: 1672 / 941; perspective: none; pointer-events: none; }
.hero-overlay .scene-layer, .hero-overlay .scene-spine { pointer-events: auto; }
.scene-atmosphere { position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: .2; transform: translate3d(-26px, 33px, -20px) scale(1.03); filter: blur(27px); }
.scene-atmosphere img { display: block; width: 100%; height: auto; }
.scene-depth { position: relative; transform-origin: 60% 56%; mask-image: linear-gradient(105deg, rgba(0,0,0,.4), rgba(0,0,0,.72) 26%, #000 56%); }
.scene-picture { display: block; width: 100%; aspect-ratio: 1672 / 941; }
.scene-image { display: block; width: 100%; height: auto; object-fit: contain; filter: drop-shadow(8px 24px 21px rgba(74,49,27,.17)); }
:root[data-theme="dark"] .scene-image { filter: brightness(.83) contrast(1.08) saturate(.96) drop-shadow(10px 24px 24px rgba(0,0,0,.45)); }
:root[data-theme="dark"] .scene-atmosphere { opacity: .12; }
.scene-connections, .scene-annotations { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scene-annotations { z-index: 3; }
.scene-layers { list-style: none; padding: 0; margin: 0; }
.scene-layer, .scene-spine {
  transform: translate3d(var(--label-x, 0px), var(--label-y, 0px), 0);
  border: 1px solid color-mix(in srgb, var(--hero-paper) 65%, white);
  background: color-mix(in srgb, var(--hero-paper) 72%, transparent);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(69,47,30,.12), 0 1px 3px rgba(69,47,30,.05);
}
:root[data-theme="dark"] .scene-layer, :root[data-theme="dark"] .scene-spine { border-color: rgba(240,180,135,.17); box-shadow: 0 12px 28px rgba(0,0,0,.32); }
.scene-layer { display: flex; align-items: baseline; gap: 8px; padding: 10px 13px; position: absolute; z-index: 4; white-space: nowrap; width: max-content; text-align: left; cursor: default; transition: border-color .2s, box-shadow .2s; }
.scene-layer:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: 0 14px 32px rgba(180,92,42,.19); }
.layer-index { color: var(--accent); font: 10px var(--mono); letter-spacing: .025em; opacity: .85; }
.scene-layer strong, .scene-spine strong { display: block; width: max-content; font-size: clamp(13px, 1.2cqw, 17px); line-height: 1.45; font-weight: 600; letter-spacing: -.01em; }
.scene-layer small, .scene-spine small { display: block; color: var(--ink-2); font-size: clamp(10px, .85cqw, 12px); line-height: 1.6; margin-top: 3px; }
.scene-layer .layer-tech { color: var(--accent); font-size: 10px; margin-top: 2px; }
.scene-spine { position: absolute; z-index: 4; margin: 0; white-space: nowrap; padding: 10px 13px; }
.scene-spine strong { font-size: clamp(11px, 1.1cqw, 15px); }
.scene-spine small { font-size: clamp(10px, .8cqw, 11px); }
:lang(en) .scene-layer strong { font-size: clamp(12px, 1.15cqw, 16px); }
:lang(en) .scene-layer small { font-size: clamp(10px, .8cqw, 11px); }
:lang(en) .scene-spine strong { font-size: clamp(10px, 1cqw, 13px); }
.hero-footnote { position: absolute; z-index: 8; left: clamp(24px, 3.8vw, 72px); bottom: 24px; }
.hero-footnote p { margin: 0 0 14px; color: var(--ink-3); font: 9px/2.4 var(--mono); letter-spacing: .35em; }
.scene-motion { display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px; min-height: 36px; padding: 0; border: 0; background: transparent; color: var(--ink-2); font-size: 11px; }
.scene-motion:hover { color: var(--accent); }
.scene-motion:disabled { cursor: default; }
.scene-motion .icon { width: 14px; height: 14px; }
.scene-motion:focus-visible, .command-button:focus-visible, .nav-tab:focus-visible, .icon-button:focus-visible, .pill-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.sec-hero .tech-loop { margin-top: 0; }

@media (min-width: 1021px) and (max-height: 850px) { .hero-footnote p { display: none; } }
@media (max-width: 1180px) and (min-width: 1021px) {
  .hero-copy { width: 63%; padding-top: 100px; }
  .hero-copy .eyebrow { font-size: 9px; }
  .hero-copy h1 { font-size: 56px; }
  :lang(zh-CN) .hero-copy h1 { font-size: 60px; }
  .hero-lead { max-width: 440px; font-size: 17px; }
  .hero-scene, .hero-overlay { width: 81%; right: 2.5%; top: 38px; }
  .scene-layer { padding: 8px 10px; }
}
@media (max-width: 920px) { .topbar { height: 64px; } .sec { scroll-margin-top: 64px; } .mobile-nav { top: 72px; } }
@media (max-width: 1020px) {
  .topbar { padding-inline: 22px; gap: 8px; }
  .brand-mark { font-size: 19px; }
  .top-actions { gap: 3px; }
  #langToggle { padding-inline: 12px; }
  #langToggle [data-role] { display: inline; }
  .home-hero { min-height: 0; overflow: visible; padding: 0 22px 24px; perspective: none; }
  .hero-copy { width: 100%; max-width: 600px; padding-top: 36px; pointer-events: auto; transform: none; }
  .hero-copy::before { display: none; }
  .hero-copy .eyebrow { white-space: normal; font-size: 9px; letter-spacing: .07em; margin-bottom: 12px; }
  .hero-copy h1 { font-size: clamp(28px, 6.9vw, 48px); line-height: 1.24; text-shadow: none; }
  :lang(zh-CN) .hero-copy h1 { font-size: clamp(34px, 8.6vw, 54px); line-height: 1.3; }
  .hero-lead { font-size: 14px; line-height: 1.65; max-width: 520px; margin-top: 14px; text-shadow: none; }
  .hero-actions { display: flex; flex-wrap: nowrap; gap: 12px; margin-top: 18px; }
  .hero-actions .command-button { min-width: 0; width: auto; height: 44px; padding-inline: 23px; font-size: 14px; box-shadow: none; }
  .hero-scene { position: relative; inset: auto; width: calc(100% + 30px); margin: 14px -15px 0; perspective: none; }
  .hero-overlay { position: relative; inset: auto; width: calc(100% + 30px); margin: 0 -15px; aspect-ratio: auto; }
  .scene-atmosphere { opacity: .15; filter: blur(14px); }
  .scene-depth { transform: none !important; mask-image: none; }
  .scene-layer { position: static; white-space: normal; gap: 6px; width: auto; padding: 0; }
  .scene-layer, .scene-spine { transform: none; background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; }
  :root[data-theme="dark"] .scene-layer, :root[data-theme="dark"] .scene-spine, .scene-layer:hover { box-shadow: none; }
  .scene-layers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; margin: 14px 15px 0; padding: 17px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
  .scene-layer strong, :lang(en) .scene-layer strong { font-size: 12px; }
  .scene-layer small, :lang(en) .scene-layer small, .scene-layer .layer-tech { font-size: 9px; margin-top: 3px; }
  .scene-spine { position: static; white-space: normal; padding: 15px 15px 0; }
  .scene-spine strong, :lang(en) .scene-spine strong { font-size: 11px; }
  .scene-spine small { font-size: 10px; }
  .scene-connections { height: auto; aspect-ratio: 1672 / 941; }
  .scene-annotations { display: none; }
  .hero-footnote { position: static; display: flex; align-items: center; justify-content: flex-end; margin-top: -39px; min-height: 36px; pointer-events: none; }
  .hero-footnote p { display: none; }
  .scene-motion { pointer-events: auto; font-size: 10px; padding-left: 8px; }
  .sec-hero .tech-loop { margin-top: 14px; }
}
@media (min-width: 621px) and (max-width: 1020px) {
  .home-hero { padding-inline: 32px; }
  .hero-copy { padding-top: 32px; max-width: 700px; }
  .hero-copy .eyebrow { font-size: 11px; }
  .hero-lead { font-size: 18px; }
  .hero-scene { max-width: min(960px, calc((100svh - 435px) * 1.77683)); margin-inline: auto; width: 100%; }
  .hero-overlay { max-width: 960px; width: 100%; margin-inline: auto; }
  .scene-layers { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .scene-layer strong, :lang(en) .scene-layer strong { font-size: 15px; }
  .scene-layer small, :lang(en) .scene-layer small, .scene-layer .layer-tech { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene-depth { transform: none !important; }
  .hero-copy, .scene-layer, .scene-spine { transform: none; }
  .hero-title .hw { opacity: 1; filter: none; transform: none; }
  .hero-title.play .hw { animation: none; }
}
