@font-face {
  font-family: "Source Han Sans CN";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/source-han-sans-cn-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Source Han Sans CN";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/source-han-sans-cn-bold.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --page: #ffffff;
  --page-secondary: #f5f5f7;
  --surface: #ffffff;
  --surface-subtle: #fafafa;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --border: rgba(0, 0, 0, 0.09);
  --border-strong: rgba(0, 0, 0, 0.16);
  --header-background: rgba(255, 255, 255, 0.78);
  --control-hover: #f2f2f2;
  --button-background: #1d1d1f;
  --button-hover: #3a3a3c;
  --button-text: #ffffff;
  --accent: #1d1d1f;
  --focus: #1d1d1f;
  --grid-line: rgba(0, 0, 0, 0.045);
  --image-shadow: rgba(0, 0, 0, 0.12);
  --api-background: #090909;
  --api-surface: #171717;
  --api-border: #2d2d2d;
  --api-text: #f5f5f7;
  --api-muted: #a1a1a6;
  --cta-background: #000000;
  --cta-text: #ffffff;
  --content-width: 1200px;
  --header-height: 64px;
  --radius-card: 20px;
  --radius-media: 22px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #000000;
  --page-secondary: #111111;
  --surface: #1d1d1f;
  --surface-subtle: #0a0a0a;
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #86868b;
  --border: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.22);
  --header-background: rgba(0, 0, 0, 0.78);
  --control-hover: #1d1d1f;
  --button-background: #f5f5f7;
  --button-hover: #ffffff;
  --button-text: #000000;
  --accent: #f5f5f7;
  --focus: #f5f5f7;
  --grid-line: rgba(255, 255, 255, 0.06);
  --image-shadow: rgba(0, 0, 0, 0.55);
  --api-background: #111111;
  --api-surface: #1d1d1f;
  --api-border: #333333;
  --api-text: #f5f5f7;
  --api-muted: #a1a1a6;
  --cta-background: #111111;
  --cta-text: #f5f5f7;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #000000;
    --page-secondary: #111111;
    --surface: #1d1d1f;
    --surface-subtle: #0a0a0a;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #86868b;
    --border: rgba(255, 255, 255, 0.13);
    --border-strong: rgba(255, 255, 255, 0.22);
    --header-background: rgba(0, 0, 0, 0.78);
    --control-hover: #1d1d1f;
    --button-background: #f5f5f7;
    --button-hover: #ffffff;
    --button-text: #000000;
    --accent: #f5f5f7;
    --focus: #f5f5f7;
    --grid-line: rgba(255, 255, 255, 0.06);
    --image-shadow: rgba(0, 0, 0, 0.55);
    --api-background: #111111;
    --api-surface: #1d1d1f;
    --api-border: #333333;
    --api-text: #f5f5f7;
    --api-muted: #a1a1a6;
    --cta-background: #111111;
    --cta-text: #f5f5f7;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family:
    "Source Han Sans CN",
    "PingFang SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Microsoft YaHei",
    sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

button,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.container {
  width: min(calc(100% - 48px), var(--content-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--button-background);
  color: var(--button-text);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: var(--header-background);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.header-inner,
.header-actions,
.site-nav,
.brand {
  display: flex;
  align-items: center;
}

.header-inner {
  min-height: var(--header-height);
  justify-content: space-between;
  gap: 24px;
}

.brand {
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 30px;
  height: 30px;
}

.header-actions {
  min-width: 0;
  gap: 18px;
}

.site-nav {
  gap: 26px;
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}

.site-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav .nav-action {
  padding-inline: 16px;
  border-radius: 999px;
  background: var(--button-background);
  color: var(--button-text);
}

.site-nav .nav-action:hover {
  background: var(--button-hover);
  color: var(--button-text);
}

.header-icon-link,
.theme-toggle {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.header-icon-link {
  text-decoration: none;
}

.github-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.theme-toggle {
  visibility: hidden;
}

.js .theme-toggle {
  visibility: visible;
}

.theme-icon {
  display: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle[data-theme-icon="dark"] .theme-icon-sun,
.theme-toggle[data-theme-icon="light"] .theme-icon-moon {
  display: block;
}

.site-header,
.hero,
.basic-section,
.advanced-section,
.install-section,
.site-footer,
.basic-grid article,
.header-icon-link,
.theme-toggle,
.example-gallery,
.example-switcher button,
.example-stage,
.model-section {
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.header-icon-link:hover,
.theme-toggle:hover {
  background: var(--control-hover);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100svh - var(--header-height));
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--page);
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  content: "";
  mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
}

.hero-inner {
  display: flex;
  min-height: calc(100svh - var(--header-height));
  align-items: center;
  justify-content: center;
  padding-block: 96px;
}

.hero-copy {
  max-width: 980px;
  text-align: center;
}

.hero-eyebrow,
.section-kicker,
.feature-index,
.example-label {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.hero-eyebrow {
  margin-bottom: 22px;
}

.hero h1 {
  max-width: 10em;
  margin: 0 auto;
  font-size: clamp(4rem, 7vw, 5.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.hero-description {
  max-width: 34em;
  margin: 30px auto 0;
  color: var(--text-secondary);
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.copy-status {
  flex-basis: 100%;
  min-height: 1.5em;
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 140ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.button-primary {
  background: var(--button-background);
  color: var(--button-text);
}

.button-primary:hover {
  background: var(--button-hover);
  color: var(--button-text);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--control-hover);
  color: var(--text);
}

.button:active {
  transform: scale(0.98);
  transition-duration: 80ms;
}

.section {
  padding-block: 120px;
}

.viewport-section {
  display: flex;
  min-height: calc(100svh - var(--header-height));
  align-items: center;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 54px;
}

.section-kicker {
  margin-bottom: 16px;
}

.section-heading h2,
.advanced-copy h2,
.install-copy h2 {
  margin-bottom: 0;
  font-size: clamp(2.75rem, 4.7vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.compact-heading {
  max-width: 720px;
}

.basic-section {
  border-bottom: 1px solid var(--border);
  background: var(--page-secondary);
}

.basic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.basic-grid article {
  min-height: 180px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.basic-grid h3 {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.basic-grid p {
  max-width: 18em;
  margin-bottom: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.advanced-section {
  border-bottom: 1px solid var(--border);
  background: var(--page);
}

.advanced-section-alt {
  background: var(--page-secondary);
}

.advanced-screen-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(460px, 1.15fr);
  gap: clamp(56px, 8vw, 108px);
  align-items: center;
}

.advanced-copy {
  max-width: 610px;
}

.feature-index {
  margin-bottom: 20px;
}

.advanced-copy > p:not(.feature-index, .feature-note) {
  max-width: 34em;
  margin: 26px 0 0;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.7;
}

.feature-note {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.65;
}

.api-showcase {
  padding: clamp(34px, 4.5vw, 52px);
  border: 1px solid var(--api-border);
  border-radius: var(--radius-card);
  background: var(--api-background);
  color: var(--api-text);
}

.api-showcase .example-label {
  color: var(--api-muted);
}

.api-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 34px;
}

.api-flow span:not(.flow-arrow) {
  display: grid;
  min-height: 68px;
  place-items: center;
  padding: 13px;
  border: 1px solid var(--api-border);
  border-radius: 10px;
  background: var(--api-surface);
  color: var(--api-text);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.flow-arrow {
  color: var(--api-muted);
  font-size: 17px;
  font-weight: 700;
}

.api-showcase .feature-note {
  border-color: var(--api-border);
  color: var(--api-muted);
}

.model-section {
  border-bottom: 1px solid var(--border);
  background: var(--page);
  color: var(--text);
}

.model-screen {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(320px, 0.85fr) minmax(
      340px,
      1fr
    );
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
  padding: clamp(36px, 5vw, 64px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--page-secondary);
}

.model-proof-meta {
  margin-bottom: 0;
  color: var(--text-tertiary);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.model-screen h2 {
  margin-bottom: 0;
  color: var(--text);
  font-size: clamp(2rem, 3.4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.model-screen-copy {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.7;
}

.example-screen {
  grid-template-columns: minmax(500px, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(48px, 6vw, 84px);
}

.example-gallery {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius-media) + 6px);
  background: var(--surface);
  box-shadow: 0 24px 70px var(--image-shadow);
}

.example-label {
  margin-bottom: 0;
}

.example-switcher {
  display: flex;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 12px;
  padding: 2px 2px 0;
  scrollbar-width: thin;
}

.example-switcher button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.example-switcher button:hover {
  border-color: var(--text);
  color: var(--text);
}

.example-switcher button.is-active {
  border-color: var(--button-background);
  background: var(--button-background);
  color: var(--button-text);
}

.example-stage {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius-media) - 6px);
  background: var(--surface-subtle);
}

.example-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transform: scale(1.12);
  transform-origin: center 56%;
  transition: opacity 160ms ease;
}

.example-image.is-loading {
  opacity: 0.36;
}

.example-caption {
  margin: 12px 4px 1px;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.55;
}

.install-section {
  padding-block: 44px 120px;
  background: var(--page);
}

.install-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 56px;
  padding: 64px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--cta-background);
  color: var(--cta-text);
}

.install-copy {
  width: 100%;
  min-width: 0;
  max-width: 760px;
}

.install-copy > p {
  max-width: 42em;
  margin: 24px 0 0;
  color: var(--api-muted);
  font-size: 17px;
}

.install-panel .button-primary {
  background: #ffffff;
  color: #000000;
}

.install-panel .button-primary:hover {
  background: #e8e8ed;
  color: #000000;
}

.site-footer {
  padding-block: 32px;
  border-top: 1px solid var(--border);
  background: var(--page);
  color: var(--text-tertiary);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-inner p {
  margin-bottom: 0;
}

.footer-inner p + p,
.footer-inner a {
  padding-left: 22px;
  border-left: 1px solid var(--border);
}

.footer-inner a {
  color: var(--text);
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    opacity: 0;
    animation: hero-enter 560ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 55ms;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 100ms;
  }

  .hero-copy > :nth-child(4) {
    animation-delay: 145ms;
  }

  @keyframes hero-enter {
    from {
      opacity: 0;
      transform: translateY(14px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 1040px) {
  .advanced-screen-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 50px;
  }

  .example-screen {
    grid-template-columns: minmax(460px, 1.15fr) minmax(0, 0.85fr);
  }

  .basic-grid article {
    padding: 26px;
  }

  .install-panel {
    padding: 52px;
  }
}

@media (max-width: 860px) {
  .brand span {
    display: none;
  }

  .advanced-screen-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }

  .example-screen .advanced-copy {
    order: 1;
  }

  .example-screen .example-gallery {
    order: 2;
  }

  .advanced-copy {
    max-width: 720px;
  }

  .model-screen {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .model-screen-copy {
    max-width: 38em;
  }

  .install-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 734px) {
  :root {
    --header-height: 60px;
    --radius-card: 18px;
    --radius-media: 18px;
  }

  .container {
    width: min(calc(100% - 44px), var(--content-width));
  }

  .header-inner {
    gap: 16px;
  }

  .header-actions {
    gap: 10px;
  }

  .site-nav {
    gap: 14px;
    font-size: 12px;
  }

  .site-nav a {
    min-height: 44px;
  }

  .site-nav .nav-action {
    padding-inline: 12px;
  }

  .header-icon-link,
  .theme-toggle {
    width: 44px;
    height: 44px;
  }

  .hero-inner {
    padding-block: 76px;
  }

  .hero h1 {
    font-size: clamp(3rem, 11vw, 4rem);
    letter-spacing: -0.035em;
    line-height: 1.08;
  }

  .hero-description {
    margin-top: 24px;
    font-size: 17px;
  }

  .section {
    padding-block: 80px;
  }

  .viewport-section {
    min-height: auto;
  }

  .section-heading {
    margin-bottom: 40px;
  }

  .section-heading h2,
  .advanced-copy h2,
  .install-copy h2 {
    font-size: clamp(2.5rem, 9.5vw, 3.25rem);
    line-height: 1.1;
  }

  .basic-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .basic-grid article {
    min-height: 0;
    padding: 28px;
  }

  .advanced-copy > p:not(.feature-index, .feature-note) {
    margin-top: 22px;
    font-size: 16px;
  }

  .example-switcher {
    width: 100%;
    scroll-snap-type: x proximity;
  }

  .example-switcher button {
    min-height: 44px;
    scroll-snap-align: start;
  }

  .install-section {
    padding-block: 28px 80px;
  }

  .install-panel {
    gap: 32px;
    padding: 38px 32px;
  }

  .install-copy > p {
    margin-top: 20px;
    font-size: 16px;
  }
}

@media (max-width: 620px) {
  .api-showcase {
    padding: 28px 22px;
  }

  .api-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .footer-inner p + p,
  .footer-inner a {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 380px) {
  .container {
    width: min(calc(100% - 32px), var(--content-width));
  }

  .header-inner {
    gap: 10px;
  }

  .brand img {
    width: 28px;
    height: 28px;
  }

  .header-actions {
    gap: 8px;
  }

  .site-nav {
    gap: 7px;
  }

  .site-nav .nav-action {
    padding-inline: 7px;
  }

  .site-nav a:not(.nav-action) {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .install-panel {
    padding: 34px 24px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--page);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  .site-header,
  .basic-grid article,
  .example-stage,
  .install-panel,
  .header-icon-link,
  .theme-toggle,
  .example-switcher button {
    border-color: var(--text);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
