:root {
  color-scheme: dark;
  --bg: #07101d;
  --bg-soft: #0a1424;
  --surface: #0e192b;
  --surface-strong: #111e33;
  --surface-muted: #0b1525;
  --border: #22324a;
  --border-strong: #30445f;
  --text: #f6f8fc;
  --text-soft: #cbd5e1;
  --muted: #8fa0b7;
  --blue: #3b82f6;
  --blue-deep: #2563eb;
  --blue-soft: #132c52;
  --green: #18c79c;
  --cyan: #20b9d5;
  --purple: #9f7aea;
  --orange: #f59e0b;
  --red: #fb7185;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  --header-bg: #07101d;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shell: 1200px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-soft: #eef3f9;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --surface-muted: #f1f5f9;
  --border: #dfe7f1;
  --border-strong: #cbd8e8;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --blue-soft: #e8f0ff;
  --green: #059669;
  --cyan: #0891b2;
  --purple: #7c3aed;
  --orange: #d97706;
  --red: #e11d48;
  --shadow: 0 24px 70px rgba(15, 23, 42, .12);
  --header-bg: #f5f7fb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M56 0H0v56' fill='none' stroke='%2322324a' stroke-opacity='.18'/%3E%3C/svg%3E");
  opacity: .58;
  pointer-events: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 65%, white);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: white;
  transform: translateY(-160%);
}

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

.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }

.section { padding: 112px 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--header-bg) 94%, transparent);
  backdrop-filter: blur(14px);
}

.header-inner { display: flex; align-items: center; min-height: 68px; gap: 34px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 760; letter-spacing: -.02em; }

.brand img { flex: 0 0 auto; }

.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }

.site-nav a { color: var(--muted); font-size: 14px; font-weight: 650; transition: color .2s ease; }

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

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
}

.icon-button svg, .button svg, .copy-button svg, .feature-icon svg, .mini-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.github-button svg { fill: currentColor; stroke: none; }

.theme-toggle svg { display: none; }
:root[data-theme-mode="system"] .theme-toggle .icon-system { display: block; }
:root[data-theme-mode="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme-mode="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; margin-left: auto; }

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 720;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--blue); color: white; box-shadow: 0 10px 30px rgba(37, 99, 235, .26); }
.button-primary:hover { background: var(--blue-deep); }
.button-secondary, .button-ghost { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.button-secondary:hover, .button-ghost:hover { border-color: var(--blue); }
.button-small { min-height: 38px; padding: 0 14px; }

.hero { padding-top: 92px; padding-bottom: 84px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(0, 1.25fr); align-items: center; gap: 56px; }

.eyebrow, .section-index, .card-kicker {
  margin: 0;
  color: var(--blue);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--text-soft); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 12%, transparent); }

.hero h1 {
  max-width: 680px;
  margin: 22px 0 24px;
  font-size: clamp(44px, 5.3vw, 70px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 790;
}

.hero h1 span { color: var(--blue); }
.hero-lead { max-width: 620px; margin: 0; color: var(--text-soft); font-size: 18px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.capability-list { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 34px 0 0; padding: 0; list-style: none; }
.capability-list li { position: relative; padding-left: 14px; color: var(--muted); font-size: 13px; font-weight: 650; }
.capability-list li::before { position: absolute; top: .65em; left: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--green); content: ""; }

.hero-product { position: relative; width: 100%; min-width: 0; }
.product-frame { overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.frame-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 42px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--surface-strong); color: var(--muted); font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; }
.frame-dots { display: flex; gap: 6px; justify-self: start; }
.frame-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.frame-dots i:first-child { background: var(--red); }
.frame-dots i:nth-child(2) { background: var(--orange); }
.frame-dots i:last-child { background: var(--green); }
.frame-address { justify-self: center; }
.frame-live { display: inline-flex; align-items: center; gap: 6px; justify-self: end; }
.frame-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.product-frame > img { width: 100%; height: auto; }

.hero-note { position: absolute; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 11px; min-width: 215px; max-width: calc(100% - 36px); padding: 13px 15px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.hero-note strong, .hero-note small { display: block; }
.hero-note strong { font-size: 13px; }
.hero-note small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.mini-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--green) 14%, var(--surface)); color: var(--green); }

.signal-strip { border-block: 1px solid var(--border); background: var(--bg-soft); }
.signal-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; min-height: 126px; gap: 20px; }
.signal-grid > i { color: var(--border-strong); font-style: normal; }
.signal-grid div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.signal-grid span { grid-row: 1 / 3; color: var(--blue); font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; }
.signal-grid strong { font-size: 14px; }
.signal-grid small { color: var(--muted); font-size: 12px; }

.section-heading { max-width: 790px; margin-bottom: 52px; }
.section-heading.compact { max-width: 720px; }
.section-heading h2, .workflow-copy h2, .deploy-copy h2, .closing-card h2 { margin: 14px 0 16px; font-size: clamp(34px, 4vw, 52px); line-height: 1.18; letter-spacing: -.04em; }
.section-heading > p:last-child, .workflow-copy > p, .deploy-copy > p { margin: 0; color: var(--muted); font-size: 17px; }

.feature-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.feature-card { position: relative; grid-column: span 2; min-height: 280px; padding: 28px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); transition: transform .25s ease, border-color .25s ease; }
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.feature-card.feature-wide { grid-column: span 4; display: grid; grid-template-columns: 54px 1fr; gap: 18px; }
.feature-card:nth-last-child(-n + 2) { grid-column: span 3; }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; }
.feature-icon.blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 13%, var(--surface)); }
.feature-icon.green { color: var(--green); background: color-mix(in srgb, var(--green) 13%, var(--surface)); }
.feature-icon.cyan { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 13%, var(--surface)); }
.feature-icon.purple { color: var(--purple); background: color-mix(in srgb, var(--purple) 13%, var(--surface)); }
.feature-icon.orange { color: var(--orange); background: color-mix(in srgb, var(--orange) 13%, var(--surface)); }
.feature-icon.red { color: var(--red); background: color-mix(in srgb, var(--red) 13%, var(--surface)); }
.feature-card .card-kicker { margin-top: 20px; color: var(--muted); }
.feature-wide .card-kicker { margin-top: 0; }
.feature-card h3 { margin: 9px 0 12px; font-size: 22px; line-height: 1.3; letter-spacing: -.02em; }
.feature-card p:not(.card-kicker) { margin: 0; color: var(--muted); font-size: 14px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag-row span { padding: 5px 9px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-soft); font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; }
.metric-sample { position: absolute; right: 24px; bottom: 22px; display: flex; align-items: end; gap: 5px; width: 150px; height: 68px; opacity: .56; }
.metric-sample i { flex: 1; min-height: 5px; border-radius: 2px 2px 0 0; background: var(--purple); }
.metric-sample .bar-1 { height: 34%; }
.metric-sample .bar-2 { height: 52%; }
.metric-sample .bar-3 { height: 42%; }
.metric-sample .bar-4 { height: 78%; }
.metric-sample .bar-5 { height: 58%; }
.metric-sample .bar-6 { height: 88%; }
.metric-sample .bar-7 { height: 64%; }
.metric-sample .bar-8 { height: 100%; }

.workflow-section { border-block: 1px solid var(--border); background: var(--bg-soft); }
.workflow-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 80px; }
.check-list { display: grid; gap: 14px; margin: 32px 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 10px; color: var(--text-soft); font-size: 14px; }
.check-list span { color: var(--green); font-weight: 800; }
.route-map { margin: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.route-node { padding: 17px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-strong); text-align: center; }
.route-node span, .route-node strong, .route-node small { display: block; }
.route-node span { color: var(--blue); font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; letter-spacing: .1em; }
.route-node strong { margin-top: 3px; font-size: 15px; }
.route-node small { color: var(--muted); font-size: 12px; }
.route-primary { border-color: color-mix(in srgb, var(--blue) 60%, var(--border)); background: var(--blue-soft); }
.route-line { display: grid; justify-items: center; height: 70px; color: var(--muted); }
.route-line i { width: 1px; height: 44px; background: var(--border-strong); }
.route-line small { padding: 2px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 10px; }
.route-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 72px; }
.route-split div { display: grid; justify-items: center; color: var(--muted); }
.route-split i { width: 1px; height: 44px; background: var(--border-strong); }
.route-split small { font-size: 10px; }
.route-targets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.gallery-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.gallery-tabs button { min-height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.gallery-tabs button:hover { color: var(--text); border-color: var(--border-strong); }
.gallery-tabs button[aria-selected="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.gallery-stage { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.gallery-meta { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.gallery-meta span { color: var(--blue); font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; letter-spacing: .1em; }
.gallery-meta h3 { margin: 4px 0 0; font-size: 24px; }
.gallery-meta p { max-width: 520px; margin: 0; color: var(--muted); font-size: 14px; text-align: right; }
.gallery-frame { box-shadow: none; }
.gallery-frame img { transition: opacity .16s ease; }
.gallery-frame img.is-switching { opacity: .25; }

.deploy-section { border-top: 1px solid var(--border); background: var(--bg-soft); }
.deploy-grid { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 74px; }
.deploy-links { display: grid; gap: 10px; margin-top: 30px; }
.deploy-links a { width: fit-content; color: var(--text-soft); font-size: 14px; font-weight: 680; }
.deploy-links a:hover { color: var(--blue); }
.terminal { overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: #08111f; box-shadow: var(--shadow); color: #dbe7f5; }
.terminal-bar { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 7px 10px 7px 12px; border-bottom: 1px solid #22324a; color: #7f91a9; font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; }
.deploy-tabs { display: flex; align-items: center; gap: 4px; }
.deploy-tabs button { min-height: 34px; padding: 0 11px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #7f91a9; font-family: inherit; font-size: 11px; cursor: pointer; }
.deploy-tabs button:hover { color: #edf6ff; }
.deploy-tabs button[aria-selected="true"] { border-color: #30445f; background: #111e33; color: #edf6ff; }
.terminal-body { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; min-height: 122px; padding: 26px 20px; }
.terminal-body .prompt { color: #18c79c; font-family: "Cascadia Code", Consolas, monospace; }
.terminal-body code { overflow-wrap: anywhere; white-space: pre-wrap; color: #edf6ff; font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; line-height: 1.8; }
.terminal-compose { min-height: 286px; }
.copy-button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #30445f; border-radius: 7px; background: #0e192b; color: #9fb1c8; font-size: 11px; cursor: pointer; }
.copy-button:hover { color: white; border-color: #3b82f6; }
.copy-button svg { width: 15px; height: 15px; }
.terminal-result { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-top: 1px solid #22324a; background: #0b1525; }
.terminal-result strong, .terminal-result small { display: block; }
.terminal-result strong { font-size: 13px; }
.terminal-result small { color: #7f91a9; font-size: 11px; }

.closing-section { padding: 38px 0 92px; background: var(--bg-soft); }
.closing-card { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 42px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.closing-card h2 { margin-bottom: 0; font-size: clamp(30px, 3vw, 42px); }
.closing-card .button { flex: 0 0 auto; }

.site-footer { padding: 30px 0; border-top: 1px solid var(--border); }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 12px; }
.footer-inner p:last-child { justify-self: end; }

.js [data-reveal] { animation: reveal-in .5s ease both; }

@keyframes reveal-in {
  from { opacity: .35; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1050px) {
  .hero-grid { grid-template-columns: 1fr; gap: 46px; }
  .hero-copy { max-width: 760px; }
  .hero-product { width: 100%; }
  .hero-note { right: 18px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card, .feature-card:nth-last-child(-n + 2) { grid-column: auto; }
  .feature-card.feature-wide { grid-column: span 2; }
  .workflow-grid, .deploy-grid { grid-template-columns: 1fr; gap: 54px; }
  .workflow-copy, .deploy-copy { max-width: 720px; }
}

@media (max-width: 820px) {
  .section { padding: 86px 0; }
  .nav-toggle { display: inline-grid; }
  .site-nav { position: absolute; top: 68px; right: 20px; left: 20px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .site-nav a { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; }
  .site-nav a:hover { background: var(--surface-muted); }
  .header-actions { margin-left: 0; }
  .github-button { width: 38px; padding: 0; font-size: 0; }
  .signal-grid { grid-template-columns: 1fr 1fr; padding-block: 22px; gap: 22px; }
  .signal-grid > i { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card, .feature-card.feature-wide, .feature-card:nth-last-child(-n + 2) { grid-column: auto; }
  .gallery-meta { align-items: start; flex-direction: column; gap: 8px; }
  .gallery-meta p { text-align: left; }
  .footer-inner { grid-template-columns: 1fr; justify-items: start; }
  .footer-inner p:last-child { justify-self: start; }
}

@media (max-width: 600px) {
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .header-inner { min-height: 62px; gap: 10px; }
  .site-nav { top: 62px; right: 14px; left: 14px; }
  .brand span { font-size: 15px; }
  .header-actions { gap: 7px; }
  .hero { padding-top: 62px; padding-bottom: 64px; }
  .hero h1 { margin-top: 18px; font-size: clamp(39px, 12vw, 52px); }
  .hero-lead { font-size: 16px; }
  .hero-actions .button { flex: 1 1 145px; }
  .capability-list { display: grid; grid-template-columns: 1fr 1fr; }
  .frame-bar { min-height: 34px; padding: 0 9px; }
  .frame-address { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero-note { right: 10px; bottom: 12px; min-width: 190px; padding: 10px 12px; }
  .hero-note .mini-icon { width: 30px; height: 30px; }
  .signal-grid { grid-template-columns: 1fr; }
  .feature-card, .gallery-stage, .route-map { padding: 20px; }
  .feature-card { min-height: 0; }
  .feature-card.feature-wide { display: block; }
  .feature-wide .feature-icon { margin-bottom: 18px; }
  .metric-sample { position: static; width: 100%; margin-top: 24px; }
  .route-split { min-height: 54px; }
  .route-split i { height: 32px; }
  .gallery-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .gallery-frame { margin-inline: -8px; }
  .terminal-body { grid-template-columns: auto 1fr; }
  .copy-button { grid-column: 2; width: fit-content; }
  .terminal-bar { align-items: flex-end; flex-direction: column; gap: 6px; }
  .deploy-tabs { width: 100%; }
  .deploy-tabs button { flex: 1; }
  #terminal-language { display: none; }
  .closing-section { padding-bottom: 64px; }
  .closing-card { align-items: flex-start; flex-direction: column; padding: 28px 22px; }
  .closing-card .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
