/* The hero stays fixed as the backdrop. The showcase scrolls over it on a transparent
   zone, and section.js hands the hero's copy and controls over as it rises. */
html.has-sections, html.has-sections body { height: auto; }
html.has-sections body { overflow-x: hidden; overflow-y: auto; }
html.has-sections body:not(.ready) { overflow: hidden; }
html.has-sections .app { z-index: 0; }
html.has-sections { --peek: 64px; }
html.has-sections .controls { bottom: calc(var(--peek) + 10px); }
html.has-sections .corner { bottom: calc(var(--peek) + 18px); }
html.has-sections .media-heroVideoPlay { bottom: calc(var(--peek) + 60px); }
@media (max-height: 760px) and (min-aspect-ratio: 1/1) { html.has-sections { --peek: 54px; } html.has-sections .controls { bottom: calc(var(--peek) + 4px); } }

/* Handover. Filters only apply once scrolling starts, so the resting hero is untouched. */
.app[data-sx-scrolled] .hud > :not(.brand):not(.brand-sub) { filter: opacity(var(--sx-hud, 1)); }
/* The line under the logo swaps text instead of disappearing. */
.hud > .sx-brand-sub { opacity: 0; }
.app[data-sx-scrolled] .hud > .brand-sub:not(.sx-brand-sub) { filter: opacity(calc((1 - var(--sx-sub, 0)) * var(--sx-chrome, 1))); }
.app[data-sx-scrolled] .hud > .sx-brand-sub, .app[data-sx-scrolled] .hud.leaving > .sx-brand-sub { opacity: 1 !important; filter: opacity(calc(var(--sx-sub, 0) * var(--sx-chrome, 1))); }
.app[data-sx-scrolled] .hud > :is(.title, .term, .status, .rcol, .mini-bar) { transform: translateY(var(--sx-lift, 0)); }
.app[data-sx-scrolled] > :is(.dock, .controls) { filter: opacity(var(--sx-dock, 1)); }
.app[data-sx-scrolled] .hud > .brand, .app[data-sx-scrolled] > .nav { filter: opacity(var(--sx-chrome, 1)); }
.app[data-sx-chrome-off] > .nav { pointer-events: none; }
.app[data-sx-past] > :is(.dock, .controls) { pointer-events: none; }
.app[data-sx-scrolled] > :is(.media-heroVideo, .media-heroTailVideo, .media-heroVideoStill) { transform: scale(var(--sx-zoom, 1)); transform-origin: 70% 40%; }
.sx-backdrop { opacity: var(--sx-shade, 0); background: linear-gradient(90deg, rgba(3, 5, 9, .94) 0%, rgba(3, 5, 9, .82) 30%, rgba(3, 5, 9, .5) 62%, rgba(3, 5, 9, .62) 100%); }

.sx {
  --sx-bg: #06080c; --sx-line: rgba(200, 215, 245, .16);
  --sx-font: 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei UI', 'Microsoft YaHei', system-ui, sans-serif;
  position: relative; z-index: 2; color: var(--ink); font-family: var(--f-hud), var(--sx-font);
}
body:not(.ready) .sx { visibility: hidden; }
.sx .i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* The zone is see-through: only real controls take clicks, the hero below gets the rest. */
.sx, .sx-zone { pointer-events: none; }
.sx-cta, .sx-foot { pointer-events: auto; }
.sx-cue, .sx-side, .sx-stage { pointer-events: auto; }
.sx-spacer { height: calc(100vh - var(--peek)); }
@supports (height: 100svh) { .sx-spacer { height: calc(100svh - var(--peek)); } }

/* Each landing row is sticky: cue-navigation.js sets --stick-top so its cue stops at the landing
   inset and stays there for the rest of its screen, until the next screen's row pushes it up. */
.sx-peek { position: sticky; top: var(--stick-top, 0px); z-index: 20; height: var(--peek); display: grid; place-items: center; }
.sx-peek.stuck::before { opacity: 0; }
/* Pushed up past the inset by the next screen's row: fade, so two 回到首页 never show together. */
.sx-cue.leaving { opacity: 0; pointer-events: none; }
.sx-peek::before { transition: opacity .3s; content: ''; position: absolute; left: 50%; top: 0; width: min(620px, 72%); height: 1px; translate: -50% 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 70%, transparent), transparent); }
.sx-hero-peek { display: flex; align-items: center; justify-content: center; gap: 22px; }
/* cue-navigation.js: a shortcut copy fades out (keeping its place) while its destination's own
   button is on screen; the button beside it slides by --away-x to the middle. */
.sx-hero-peek .sx-cue { translate: var(--away-x, 0px) 0; transition: transform .25s cubic-bezier(.2, .7, .1, 1), box-shadow .25s, translate .45s cubic-bezier(.2, .7, .1, 1), opacity .3s; }
.sx-cue.away { opacity: 0; pointer-events: none; }
/* The rounded, playful control on the page: it is the invitation to scroll. */
@property --sx-spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.sx-cue {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 6px 6px 8px; border: 0; border-radius: 999px; background: rgba(8, 12, 20, .82);
  color: var(--ink); font: 600 14px var(--sx-font); letter-spacing: .04em; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .25s cubic-bezier(.2, .7, .1, 1), box-shadow .25s, opacity .25s;
}
.sx-cue::before { content: ''; position: absolute; inset: -1.5px; z-index: -1; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--sx-spin), #22d3a6, #f0915f, #5b7bff, #22d3a6);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: sx-spin 6s linear infinite; }
.sx-cue::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .14) 50%, transparent 65%) -150% 0 / 200% 100% no-repeat;
  animation: sx-shine 3.6s ease-in-out infinite; }
.sx-cue:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 38px rgba(0, 0, 0, .45), 0 0 26px color-mix(in srgb, var(--accent) 35%, transparent); }
.sx-cue-marks { display: flex; }
.sx-cue-marks i { display: grid; place-items: center; width: 28px; height: 28px; margin-left: -8px; border-radius: 50%; border: 2px solid #0a0e16; animation: sx-bob 2.4s ease-in-out infinite; }
.sx-cue-marks i:first-child { margin-left: 0; }
.sx-cue-marks i:nth-child(2) { animation-delay: .2s; } .sx-cue-marks i:nth-child(3) { animation-delay: .4s; }
.cue-codex { background: #1d1d1d; color: #e6e6e6; }
.cue-claude { background: #faf9f5; }
.cue-deepseek { background: #fff; }
.sx-cue .mark-codex { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sx-cue .mark-claude { width: 15px; height: 15px; fill: none; stroke: #d97757; stroke-width: 2.6; stroke-linecap: round; }
.sx-cue .mark-deepseek { width: 17px; height: 13px; fill: #4d6bfe; }
.sx-cue .mark-deepseek circle { fill: #fff; }
.sx-cue-arrow { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #03070d; }
.sx-cue-arrow::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); animation: sx-ripple 2s ease-out infinite; }
.sx-cue-arrow .i { width: 16px; height: 16px; stroke-width: 2.4; animation: sx-hop 1.4s ease-in-out infinite; transition: rotate .3s; }
.sx-cue.up .sx-cue-arrow .i { rotate: 180deg; animation: none; }
.sx-cue.up .sx-cue-arrow::after { animation: none; opacity: 0; }
.sx-cue.nudge { animation: sx-wiggle 1.4s ease-in-out 3; }
@keyframes sx-spin { to { --sx-spin: 360deg; } }
@keyframes sx-shine { 0%, 55% { background-position: -150% 0; } 100% { background-position: 250% 0; } }
@keyframes sx-bob { 50% { transform: translateY(-3px); } }
@keyframes sx-hop { 0%, 100% { translate: 0 -1px; } 50% { translate: 0 4px; } }
@keyframes sx-ripple { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
@keyframes sx-wiggle { 0%, 100% { transform: none; } 20% { transform: translateY(-4px) rotate(-1.5deg); } 40% { transform: translateY(0) rotate(1.5deg); } 60% { transform: translateY(-2px); } }

/* Left column takes the dock's place, the client takes the character's. */
/* Section navigation lands on the preceding cue so it remains visible above the content. */
.sx-body { padding: clamp(28px, 3vw, 44px) 0 24px; pointer-events: none; }
.sx-grid {
  display: grid; grid-template-columns: clamp(270px, 21vw, 330px) minmax(0, 1fr); gap: clamp(24px, 2.4vw, 44px); align-items: center;
  max-width: 1760px; margin: 0 auto; padding: 0 3.4% 0 4.2%;
  scroll-margin-top: calc(var(--peek) + clamp(28px, 3vw, 44px));
}
.sx-kicker, .sx-eyebrow { margin: 0; font: 600 11px var(--f-hud); letter-spacing: .24em; }
.sx-kicker { color: var(--ink-faint); }
/* Leaves room for the brand line under the logo, which stays on this screen. */
.sx-side { padding-top: 18px; }
.sx-eyebrow { color: var(--accent); }
.sx-side h2 { margin: 8px 0 18px; font: 600 clamp(20px, 1.6vw, 25px)/1.4 var(--f-hud), var(--sx-font); letter-spacing: .02em; }

.sx-side h2 > span { display: block; white-space: nowrap; }

/* Tabs follow the hero pager: flat label, icon, progress rule. */
.sx-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; margin: 0 0 26px; }
.sx-tabs button { display: grid; gap: 8px; padding: 6px 0 0; border: 0; background: none; color: var(--ink-faint); font: 600 12px var(--f-hud); letter-spacing: .16em; text-align: left; cursor: pointer; transition: color .25s; }
.sx-tab-label { display: flex; align-items: center; gap: 7px; white-space: nowrap; text-transform: uppercase; }
.sx-tab-label svg { width: 15px; height: 15px; flex: none; }
.sx-tab-bar { display: block; height: 1px; background: rgba(200, 215, 245, .16); overflow: hidden; }
.sx-tab-bar i { display: block; height: 100%; background: var(--tab); box-shadow: 0 0 6px var(--tab); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .7, .1, 1); }
.sx-tabs button:hover { color: var(--ink-dim); }
.sx-tabs button[aria-selected='true'] { color: var(--ink); }
.sx-tabs button[aria-selected='true'] svg { color: var(--tab); }
.sx-tabs button[aria-selected='true'] .sx-tab-bar i { transform: scaleX(1); }

.sx-copy h3 { margin: 10px 0 12px; font: 600 clamp(24px, 2vw, 30px)/1.25 var(--f-display), var(--sx-font); }
.sx-points { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; font-family: var(--sx-font); }
.sx-points li { display: grid; gap: 1px; padding-left: 12px; border-left: 2px solid color-mix(in srgb, var(--accent) 65%, transparent); }
.sx-points b { font-size: 14px; font-weight: 600; }
.sx-points span { color: var(--ink-dim); font-size: 12.5px; }
.sx-models { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.sx-models .model-name { padding: 5px 8px; border: 1px solid var(--ink-faint); background: rgba(3, 7, 14, .62); color: var(--accent); font: 11px/1.4 var(--f-mono); }
.sx-models .model-name:hover { border-color: var(--accent); }
.sx-models .model-name { display: inline-flex; align-items: center; gap: 6px; }
.sx-palette { width: 15px; height: 15px; flex: none; }
.sx-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 360px; margin-top: 20px; }
.sx-actions .btn { justify-content: center; gap: 8px; padding: .85em 1.2em; font-size: 13px; }
.sx-actions .primary { grid-column: 1 / -1; }

/* The client keeps a desktop-window ratio but never outgrows the screen.
   No transform or container query sits on its ancestors once settled: the demo uses fixed positioning. */
.sx-stage { position: relative; min-width: 0; }
.sx-stage::before { content: ''; position: absolute; inset: 10% 8% 16%; z-index: -1; background: var(--accent); opacity: .12; filter: blur(90px); }
.sx-clients { display: grid; width: 100%; aspect-ratio: 1.45; min-height: 500px; max-height: min(900px, calc(100vh - var(--peek) - 132px)); border-radius: 12px; box-shadow: 0 34px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); }
.sx-clients > * { grid-area: 1 / 1; min-height: 0; }
.sx-client { display: block; height: 100%; border-radius: 12px; }
.sx-client[hidden], .sx-client-loading[hidden] { display: none; }
.sx-client-loading { display: grid; place-items: center; margin: 0; border-radius: 12px; background: #fbf8fb; color: #8a8790; font: 13px var(--sx-font); }

.sx-cta { padding-top: 90px; background: linear-gradient(180deg, transparent, var(--sx-bg) 90px); }
.sx-cta-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; max-width: 1760px; margin: 0 auto; padding: 34px 3.4% 44px 4.2%; border-top: 1px solid var(--sx-line); }
.sx-cta-inner > div:first-child { flex: 1 1 360px; }
.sx-cta h2 { margin: 0 0 6px; font: 600 21px var(--f-hud), var(--sx-font); letter-spacing: .02em; }
.sx-cta p { margin: 0; color: var(--ink-dim); font: 14px var(--sx-font); }
.sx-cta .endpoint { backdrop-filter: none; -webkit-backdrop-filter: none; }
.sx-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px 3.4% calc(22px + env(safe-area-inset-bottom, 0px)) 4.2%; border-top: 1px solid var(--sx-line); background: var(--sx-bg); color: var(--ink-faint); font: 12px var(--f-hud), var(--sx-font); letter-spacing: .08em; }
.sx-foot span:last-child { display: flex; gap: 22px; }
.sx-foot a { color: var(--ink-dim); text-decoration: none; }
.sx-foot a:hover { color: var(--ink); }
.sx a:focus-visible, .sx button:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

/* Reveals: the left column rises in order, the client tilts up, the CTA follows. */
.sx-grid > .sx-side > :not(.sx-copy) { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .1, 1); }
.sx-grid.in > .sx-side > :not(.sx-copy) { opacity: 1; transform: none; }
.sx-grid.in > .sx-side > :nth-child(2) { transition-delay: .06s; }
.sx-grid.in > .sx-side > :nth-child(3) { transition-delay: .12s; }
.sx-copy > * { opacity: 0; }
.sx-copy.anim > * { animation: sx-rise .6s cubic-bezier(.2, .7, .1, 1) calc(var(--d, 0) * 55ms + 120ms) both; }
@keyframes sx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sx-stage { opacity: 0; transform: perspective(1400px) translateY(46px) rotateX(10deg) scale(.95); transform-origin: 50% 100%; transition: opacity .8s ease, transform 1.1s cubic-bezier(.2, .7, .1, 1); }
.sx-stage.in { opacity: 1; transform: perspective(1400px) translateY(0) rotateX(0) scale(1); }
.sx-stage.settled { transform: none; transition: none; }
.sx-cta-inner { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .1, 1); }
.sx-cta.in .sx-cta-inner { opacity: 1; transform: none; }

@media (max-height: 640px) and (min-aspect-ratio: 1/1) { .sx-points span { display: none; } }
@media (max-height: 800px) and (min-aspect-ratio: 1/1) {
  .sx-side h2 { margin-bottom: 12px; } .sx-tabs { margin-bottom: 18px; }
  .sx-points { gap: 6px; margin-bottom: 12px; }
  .sx-copy h3 { margin: 6px 0 8px; }
  /* The usage tip is gone, so the detail lines fit again on short screens; only the shortest hide them. */
}
@media (max-width: 1080px) {
  .sx-grid { grid-template-columns: 1fr; padding: 0 20px; }
  .sx-side { max-width: 640px; }
  .sx-clients { aspect-ratio: auto; height: clamp(560px, 80vh, 760px); max-height: none; }
  .sx-backdrop { background: rgba(3, 5, 9, .88); }
}
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  html.has-sections { --peek: 58px; }
  /* model-copy.css already lifts the title to 306px for the model chips. */
  html.has-sections .title { bottom: calc(306px + var(--peek) + env(safe-area-inset-bottom, 0px)); }
  html.has-sections .dock { bottom: calc(64px + var(--peek) + env(safe-area-inset-bottom, 0px)); }
  html.has-sections .controls { bottom: calc(14px + var(--peek) + env(safe-area-inset-bottom, 0px)); }
  .sx-grid { scroll-margin-top: 76px; }
  .sx-cue { gap: 10px; font-size: 12.5px; }
  .sx-tabs button { letter-spacing: .1em; }
  .sx-clients { height: 760px; }
  .sx-cta .endpoint { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-grid > .sx-side > *, .sx-copy > *, .sx-stage, .sx-cta-inner { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
  .sx-cue, .sx-cue::before, .sx-cue::after, .sx-cue-marks i, .sx-cue-arrow .i, .sx-cue-arrow::after { animation: none !important; }
  .sx-hero-peek .sx-cue { transition: none !important; }
}

/* Stack both hero destinations on phones while preserving full labels. */
@media (max-width: 700px) {
  html.has-sections { --peek: 112px; }
  .sx-hero-peek { flex-direction: column; gap: 8px; }
  .sx-cue { gap: 8px; font-size: 12.5px; letter-spacing: .02em; }
  .sx-cue-marks { display: none; }
}

/* In short landscape viewports keep business actions above the model pager. */
@media (max-height: 500px) and (min-aspect-ratio: 1/1) {
  html.has-sections .dock { top: auto; bottom: calc(var(--peek) + 56px + env(safe-area-inset-bottom, 0px)); }
}
