/* Xingyi — GitHub Pages */
:root {
  color-scheme: light;
  --bg: #f6f8f4;
  --bg-elevated: #ffffff;
  --bg-soft: #eef2ec;
  --surface: rgba(255, 255, 255, 0.74);
  --text: #17221e;
  --text-soft: #3e4c46;
  --muted: #6c7973;
  --line: #dfe6df;
  --line-strong: #ccd6ce;
  --green: #176b52;
  --green-bright: #1b8061;
  --green-soft: #dff2e9;
  --mint: #7ce2ba;
  --navy: #13241f;
  --navy-soft: #1b3029;
  --purple: #7458c8;
  --orange: #b76a28;
  --blue: #3c6eb5;
  --shadow-sm: 0 8px 30px rgba(30, 55, 44, 0.06);
  --shadow-lg: 0 35px 90px rgba(30, 55, 44, 0.14);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101613;
  --bg-elevated: #18201c;
  --bg-soft: #161e1a;
  --surface: rgba(24, 32, 28, 0.78);
  --text: #edf4ef;
  --text-soft: #c2cec7;
  --muted: #94a299;
  --line: #2a3730;
  --line-strong: #3a4940;
  --green: #76d9b1;
  --green-bright: #89e6bf;
  --green-soft: #1c382d;
  --navy: #0b110e;
  --navy-soft: #14251e;
  --purple: #b5a1ee;
  --orange: #e3a36b;
  --blue: #94bce9;
  --shadow-sm: 0 8px 30px rgba(0, 0, 0, 0.14);
  --shadow-lg: 0 35px 90px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 240ms ease, color 240ms ease;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--mint);
  color: #10241c;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

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

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

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--green) 42%, transparent);
  outline-offset: 4px;
}

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

.section {
  padding: 120px 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

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

.page-noise {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}

/* Navigation */
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid transparent;
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  border-color: color-mix(in srgb, var(--line) 75%, transparent);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  box-shadow: 0 6px 30px rgba(25, 45, 36, 0.03);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.nav-wrap {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
}

.brand img {
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(18, 84, 61, 0.16);
}

.brand-name {
  font-size: 21px;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.brand-en {
  margin-left: 1px;
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: 60px;
}

.desktop-nav a {
  position: relative;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 550;
  transition: color 180ms ease;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1.5px;
  background: var(--green);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease);
}

.desktop-nav a:hover {
  color: var(--green);
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

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

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

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

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

.github-link {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 650;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.github-link:hover {
  border-color: var(--line-strong);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.github-link > svg:first-child {
  width: 18px;
  height: 18px;
}

.github-link .arrow-up {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.menu-toggle,
.mobile-nav {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 170px 0 0;
}

.hero::before {
  position: absolute;
  z-index: -2;
  top: 0;
  right: 0;
  left: 0;
  height: 780px;
  background-image: linear-gradient(color-mix(in srgb, var(--line) 42%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--line) 42%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 86%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.hero-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.hero-orb-one {
  top: -200px;
  right: -80px;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(113, 220, 176, 0.2), rgba(113, 220, 176, 0) 68%);
}

.hero-orb-two {
  top: 120px;
  left: -300px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(160, 144, 222, 0.13), rgba(160, 144, 222, 0) 68%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 54px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elevated) 70%, transparent);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: border-color 180ms ease, transform 180ms ease;
}

.release-pill:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.release-pill svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #2db57e;
  box-shadow: 0 0 0 4px rgba(45, 181, 126, 0.12);
}

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

h1 {
  max-width: 660px;
  margin: 26px 0 26px;
  font-size: clamp(48px, 5.1vw, 74px);
  font-weight: 760;
  line-height: 1.14;
  letter-spacing: -0.055em;
}

h1 span {
  color: var(--green);
  white-space: nowrap;
}

.hero-description {
  max-width: 510px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 680;
  line-height: 1;
  transition: transform 200ms var(--ease), box-shadow 200ms ease, background 200ms ease, border-color 200ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  background: var(--navy);
  color: #f6fff9;
  box-shadow: 0 12px 26px rgba(19, 36, 31, 0.17);
}

html[data-theme="dark"] .button-primary {
  background: var(--green);
  color: #10241c;
}

.button-primary:hover {
  box-shadow: 0 16px 34px rgba(19, 36, 31, 0.24);
}

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

.button-secondary:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-sm);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 19px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-meta svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.hero-visual {
  position: relative;
  min-width: 0;
  padding: 30px 0 62px;
}

.visual-glow {
  position: absolute;
  inset: 0 0 20px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(88, 187, 147, 0.19), transparent 68%);
  filter: blur(30px);
}

.app-window {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 112%;
  border: 1px solid rgba(152, 177, 165, 0.32);
  border-radius: 16px;
  background: #101a1c;
  box-shadow: 0 38px 80px rgba(26, 54, 43, 0.2), 0 3px 10px rgba(26, 54, 43, 0.12);
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
  transform-origin: left center;
}

.window-bar,
.preview-toolbar {
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  background: #182324;
  color: #91a29d;
  font-size: 9px;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #435250;
}

.window-dots span:first-child {
  background: #d77567;
}

.window-dots span:nth-child(2) {
  background: #d6aa59;
}

.window-dots span:nth-child(3) {
  background: #6caf7e;
}

.window-title {
  margin: auto;
  padding-right: 42px;
}

.window-live {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #86c9ad;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.window-live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #69d5a7;
}

.app-window > img {
  width: 100%;
  height: auto;
}

.floating-card {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(253, 255, 253, 0.88);
  color: #1b2823;
  box-shadow: 0 18px 44px rgba(20, 45, 35, 0.17);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-theme="dark"] .floating-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(27, 38, 32, 0.9);
  color: #eff8f2;
}

.floating-translate {
  right: -28px;
  bottom: 6px;
  width: 310px;
  padding: 16px 18px;
  border-radius: 15px;
}

.floating-label {
  display: block;
  margin-bottom: 9px;
  color: #688078;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.language-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.language-row strong {
  font-size: 12px;
  font-weight: 650;
}

.language-row > span {
  color: #7b8b84;
  font-size: 8px;
}

.language-row.translated strong {
  color: #237659;
}

.translation-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 0;
  color: #7ca392;
}

.translation-divider span {
  height: 1px;
  flex: 1;
  background: #dfe8e2;
}

.translation-divider svg {
  width: 12px;
  height: 12px;
}

.floating-audio {
  top: 5px;
  left: -26px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 13px;
}

.audio-icon {
  color: #267557;
}

.audio-icon svg {
  width: 17px;
  height: 17px;
}

.waveform {
  height: 18px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.waveform i {
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: #58ae8c;
  animation: wave 1.4s ease-in-out infinite;
}

.waveform i:nth-child(2n) { height: 12px; animation-delay: -0.3s; }
.waveform i:nth-child(3n) { height: 17px; animation-delay: -0.6s; }
.waveform i:nth-child(4n) { height: 9px; animation-delay: -0.9s; }

.floating-audio > span {
  color: #698077;
  font-size: 8px;
  font-weight: 650;
}

@keyframes wave {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

.tech-strip {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 60px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tech-intro,
.tech-note {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.tech-list {
  display: flex;
  align-items: center;
  gap: 38px;
}

.tech-list > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

.tech-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #888;
}

.tech-dot.rust { background: #9b6247; }
.tech-dot.tauri { background: #d3a337; }
.tech-dot.svelte { background: #e15b38; }
.tech-dot.websocket { background: #488fb0; }

/* Shared section typography */
.section-heading {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: end;
  gap: 80px;
  margin-bottom: 52px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 17px;
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 20px;
  height: 1.5px;
  background: currentColor;
  content: "";
}

.section-heading h2,
.modes-heading h2,
.architecture-copy h2,
.developer-copy h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 3.6vw, 48px);
  font-weight: 720;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.section-heading > p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

/* Features */
.features-section {
  padding-top: 130px;
}

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

.feature-card {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset;
  transition: border-color 240ms ease, transform 300ms var(--ease), box-shadow 300ms ease;
}

.feature-card:hover {
  border-color: color-mix(in srgb, var(--green) 32%, var(--line));
  box-shadow: var(--shadow-sm);
  transform: translateY(-4px);
}

.feature-large {
  grid-column: span 2;
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  border-radius: 12px;
  background: #eee9f8;
  color: #7357b5;
}

html[data-theme="dark"] .feature-icon {
  background: #2a2439;
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.feature-icon.green { background: #e2f3ea; color: #287557; }
.feature-icon.orange { background: #f8ecde; color: #a9662f; }
.feature-icon.blue { background: #e5eef8; color: #4673a9; }
.feature-icon.mint { background: rgba(124, 226, 186, 0.12); color: #8ee6c0; }
html[data-theme="dark"] .feature-icon.green { background: #1c382d; color: #83d9b4; }
html[data-theme="dark"] .feature-icon.orange { background: #392c20; color: #dfaa78; }
html[data-theme="dark"] .feature-icon.blue { background: #202f40; color: #94bce9; }

.feature-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.15em;
}

.feature-card h3 {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.feature-subtitles {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  grid-template-rows: auto 1fr;
  column-gap: 28px;
  background: linear-gradient(145deg, var(--bg-elevated), color-mix(in srgb, var(--green-soft) 45%, var(--bg-elevated)));
}

.feature-subtitles .feature-icon {
  grid-column: 1;
}

.feature-copy {
  grid-column: 1;
}

.subtitle-demo {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--green) 14%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-elevated) 86%, transparent);
  box-shadow: 0 15px 35px rgba(31, 65, 49, 0.07);
}

.caption-source > span,
.caption-target > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.caption-source p,
.caption-target p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
}

.caption-target p {
  color: var(--green);
}

.caption-flow {
  display: flex;
  gap: 4px;
  margin: 16px 0;
}

.caption-flow i {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}

.caption-flow i:nth-child(2) { background: var(--green); }

.model-badges {
  display: flex;
  gap: 8px;
  margin-top: 26px;
}

.model-badges > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  font-size: 11px;
  font-weight: 650;
}

.model-badges small {
  color: var(--green);
  font-size: 8px;
  font-weight: 600;
}

.feature-voice {
  grid-column: span 2;
}

.feature-voice p {
  max-width: 470px;
}

.voice-line {
  position: absolute;
  right: 28px;
  bottom: 30px;
  left: 28px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  opacity: 0.55;
}

.voice-line::before {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
  content: "";
}

.voice-line i {
  z-index: 1;
  width: 3px;
  height: 10px;
  border-radius: 3px;
  background: var(--blue);
}

.voice-line i:nth-child(3n) { height: 30px; }
.voice-line i:nth-child(4n) { height: 20px; }
.voice-line i:nth-child(5n) { height: 40px; }
.voice-line i:nth-child(7n) { height: 25px; }

.feature-privacy {
  background: var(--navy);
  color: #f0faf4;
}

.feature-privacy p {
  color: #a8bbb1;
}

.feature-privacy .feature-kicker {
  color: #8fa89b;
}

.privacy-pattern {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(124, 226, 186, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(124, 226, 186, 0.03), 0 0 0 56px rgba(124, 226, 186, 0.025);
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 6px 10px;
  border: 1px solid rgba(124, 226, 186, 0.15);
  border-radius: 8px;
  background: rgba(124, 226, 186, 0.05);
  color: #a5c8b6;
  font-size: 9px;
}

/* Modes */
.modes-section {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #f2f8f4;
}

.modes-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: linear-gradient(rgba(157, 203, 179, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(157, 203, 179, 0.12) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 20% 40%, black, transparent 60%);
  -webkit-mask-image: radial-gradient(circle at 20% 40%, black, transparent 60%);
}

.modes-section .container {
  position: relative;
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 90px;
}

.modes-heading {
  align-self: start;
  position: sticky;
  top: 130px;
}

.eyebrow-dark {
  color: #83d9b4;
}

.modes-heading h2 {
  margin-bottom: 26px;
}

.modes-heading h2 span {
  color: #91a89c;
}

.modes-heading p {
  max-width: 400px;
  color: #93a89d;
  font-size: 14px;
  line-height: 1.9;
}

.mode-list {
  border-top: 1px solid rgba(207, 232, 218, 0.13);
}

.mode-item {
  display: grid;
  grid-template-columns: 34px minmax(150px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 27px 0;
  border-bottom: 1px solid rgba(207, 232, 218, 0.13);
  transition: padding 240ms var(--ease), background 240ms ease;
}

.mode-item:hover {
  padding-right: 12px;
  padding-left: 12px;
  background: rgba(124, 226, 186, 0.035);
}

.mode-number {
  align-self: start;
  padding-top: 4px;
  color: #648174;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.mode-main h3 {
  margin-bottom: 5px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.mode-main p {
  margin: 0;
  color: #8ea69a;
  font-size: 12px;
}

.mode-route {
  grid-column: 2 / 4;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -5px;
  color: #819b8e;
}

.mode-route span {
  padding: 3px 7px;
  border: 1px solid rgba(174, 207, 189, 0.13);
  border-radius: 5px;
  font-size: 8px;
}

.mode-route svg {
  width: 20px;
  height: 12px;
  color: #68a68a;
}

.mode-route b {
  font-size: 9px;
  font-weight: 400;
}

.mode-tag {
  grid-column: 3;
  grid-row: 1;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(124, 226, 186, 0.08);
  color: #8cc8ac;
  font-size: 9px;
  white-space: nowrap;
}

/* Preview */
.preview-section {
  background: var(--bg-soft);
}

.preview-heading {
  align-items: center;
}

.preview-tabs {
  justify-self: end;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
}

.preview-tabs button {
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.preview-tabs button[aria-selected="true"] {
  background: var(--navy);
  color: #f5fff8;
  box-shadow: 0 4px 12px rgba(20, 40, 31, 0.15);
}

html[data-theme="dark"] .preview-tabs button[aria-selected="true"] {
  background: var(--green);
  color: #11251c;
}

.preview-stage {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #101a1c;
  box-shadow: var(--shadow-lg);
}

.preview-toolbar {
  height: 44px;
  padding: 0 18px;
  font-size: 10px;
}

.preview-toolbar > span:nth-child(2) {
  margin: auto;
}

.preview-toolbar .preview-platform {
  color: #647772;
  font-size: 8px;
}

.preview-stage > img {
  width: 100%;
  height: auto;
  transition: opacity 160ms ease;
}

.preview-stage > img.is-switching {
  opacity: 0.25;
}

.preview-caption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 2px 0;
  color: var(--muted);
  font-size: 11px;
}

.preview-caption > span:last-child {
  letter-spacing: 0.08em;
}

/* Architecture */
.architecture-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 100px;
}

.architecture-copy h2 {
  margin-bottom: 24px;
}

.architecture-copy > p {
  max-width: 410px;
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 650;
}

.text-link span {
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translate(2px, -2px);
}

.flow-card {
  position: relative;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

.flow-node-icon,
.model-symbol {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}

.flow-node-icon svg {
  width: 20px;
  height: 20px;
}

.flow-node-icon img {
  border-radius: 8px;
}

.flow-node small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.flow-node strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
}

.flow-node-app {
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
}

.flow-local {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 8px;
}

.flow-connector {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-connector > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line-strong);
}

.flow-connector small {
  z-index: 1;
  padding: 2px 8px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.flow-branches {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.flow-branches::before {
  position: absolute;
  top: -14px;
  right: 25%;
  left: 25%;
  height: 14px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  content: "";
}

.model-symbol {
  background: #eee9f8;
  color: #795cbd;
  font-size: 17px;
  font-weight: 750;
}

.model-symbol-dark {
  background: #e8eceb;
  color: #384c44;
}

html[data-theme="dark"] .model-symbol { background: #2c263b; color: #b7a2ee; }
html[data-theme="dark"] .model-symbol-dark { background: #2a3530; color: #b7c6be; }

.flow-output {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 10px;
}

.flow-output span {
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.flow-output i {
  font-style: normal;
}

/* Quick start */
.quick-section {
  padding-top: 20px;
}

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

.step-card {
  position: relative;
  min-height: 320px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.step-index {
  position: absolute;
  top: 27px;
  right: 27px;
  color: var(--line-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.step-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--green);
}

.step-icon svg {
  width: 22px;
  height: 22px;
}

.step-card h3 {
  margin-bottom: 12px;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.step-card p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.step-card a {
  position: absolute;
  bottom: 27px;
  left: 28px;
  color: var(--green);
  font-size: 11px;
  font-weight: 650;
}

.step-card a span {
  display: inline-block;
  margin-left: 4px;
  transition: transform 180ms ease;
}

.step-card a:hover span {
  transform: translate(2px, -2px);
}

.install-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg-soft);
  color: var(--muted);
}

.install-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--green);
}

.install-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.8;
}

.install-note strong {
  color: var(--text-soft);
  font-weight: 650;
}

/* Developer CTA */
.developer-section {
  padding-top: 20px;
}

.developer-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 64px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #f2faf5;
  box-shadow: 0 30px 70px rgba(17, 36, 28, 0.14);
}

.developer-decoration {
  position: absolute;
  top: -65px;
  left: 38%;
  display: flex;
  gap: 40px;
  color: rgba(129, 213, 172, 0.035);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 280px;
  font-weight: 300;
  line-height: 1;
  pointer-events: none;
}

.developer-copy {
  position: relative;
}

.developer-copy h2 {
  margin-bottom: 20px;
}

.developer-copy > p {
  max-width: 460px;
  margin-bottom: 28px;
  color: #9db2a7;
  font-size: 13px;
  line-height: 1.9;
}

.developer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-light {
  background: #ecf8f1;
  color: #18382b;
}

.button-light:hover {
  box-shadow: 0 10px 28px rgba(124, 226, 186, 0.12);
}

.button-ghost {
  border-color: rgba(222, 241, 230, 0.18);
  color: #d8e9df;
}

.button-ghost:hover {
  border-color: rgba(222, 241, 230, 0.38);
  background: rgba(255, 255, 255, 0.03);
}

.clone-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(190, 222, 204, 0.16);
  border-radius: 16px;
  background: rgba(5, 16, 11, 0.28);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.clone-label,
.clone-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: #7f9d8e;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.clone-label {
  border-bottom: 1px solid rgba(190, 222, 204, 0.12);
}

.clone-command {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 23px 16px;
}

.clone-command code {
  overflow: hidden;
  flex: 1;
  color: #c4d7cc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  line-height: 1.7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clone-command code span {
  margin-right: 5px;
  color: #75c39f;
}

.clone-command button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(190, 222, 204, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: #8da99a;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.clone-command button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #d9eee2;
}

.clone-command button svg {
  width: 14px;
  height: 14px;
}

.clone-footer {
  border-top: 1px solid rgba(190, 222, 204, 0.12);
}

.clone-footer > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.clone-footer i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6bc499;
}

.clone-footer a {
  color: #9fc2af;
}

/* Footer */
.site-footer {
  padding: 30px 0 0;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding-top: 45px;
  padding-bottom: 55px;
}

.footer-brand p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.footer-links > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links strong {
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 680;
}

.footer-links a {
  align-self: flex-start;
  color: var(--muted);
  font-size: 11px;
  transition: color 180ms ease;
}

.footer-links a:hover {
  color: var(--green);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  padding-bottom: 25px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.footer-bottom > span:last-child {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.04em;
}

.footer-bottom i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.toast {
  position: fixed;
  z-index: 200;
  bottom: 28px;
  left: 50%;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #14251e;
  color: #edf9f2;
  font-size: 12px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: opacity 200ms ease, transform 250ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Reveal animation */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.js .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal-delay {
  transition-delay: 100ms;
}

/* Responsive */
@media (max-width: 1080px) {
  .hero-grid {
    gap: 32px;
  }

  h1 {
    font-size: 54px;
  }

  .app-window {
    width: 108%;
  }

  .floating-translate {
    right: -8px;
    width: 280px;
  }

  .desktop-nav {
    gap: 25px;
    margin-left: 20px;
  }

  .modes-section .container {
    gap: 55px;
  }

  .architecture-grid {
    gap: 55px;
  }

  .developer-card {
    gap: 35px;
    padding: 48px;
  }
}

@media (max-width: 900px) {
  .section {
    padding: 95px 0;
  }

  .desktop-nav {
    display: none;
  }

  .hero {
    padding-top: 135px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .hero-copy {
    max-width: 660px;
    text-align: center;
    justify-self: center;
  }

  .release-pill {
    margin-inline: auto;
  }

  h1 {
    font-size: clamp(48px, 8vw, 66px);
  }

  .hero-description {
    margin-inline: auto;
  }

  .hero-actions,
  .hero-meta {
    justify-content: center;
  }

  .hero-visual {
    width: min(100%, 700px);
    margin-inline: auto;
  }

  .app-window {
    width: 100%;
    transform: none;
  }

  .floating-audio {
    left: -12px;
  }

  .floating-translate {
    right: -12px;
  }

  .tech-strip {
    margin-top: 30px;
  }

  .tech-note {
    display: none;
  }

  .section-heading {
    gap: 40px;
  }

  .feature-subtitles {
    grid-template-columns: 1fr 1fr;
  }

  .modes-section .container {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .modes-heading {
    position: static;
  }

  .modes-heading p {
    max-width: 550px;
  }

  .architecture-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .architecture-copy > p {
    max-width: 580px;
  }

  .flow-card {
    max-width: 650px;
  }

  .developer-card {
    grid-template-columns: 1fr;
  }

  .developer-copy > p {
    max-width: 560px;
  }

  .quick-section,
  .developer-section {
    padding-top: 0;
  }
}

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

  .section {
    padding: 78px 0;
  }

  .nav-wrap {
    height: 68px;
  }

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

  .brand-name {
    font-size: 19px;
  }

  .brand-en {
    font-size: 8px;
  }

  .github-link {
    display: none;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }

  .menu-toggle span {
    width: 16px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 200ms ease;
  }

  .site-header.is-open .menu-toggle span:first-child {
    transform: translateY(3.25px) rotate(45deg);
  }

  .site-header.is-open .menu-toggle span:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
  }

  .mobile-nav {
    position: fixed;
    top: 68px;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 25px 24px;
    background: var(--bg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 220ms var(--ease);
  }

  .site-header.is-open .mobile-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-nav a {
    padding: 17px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
    font-weight: 600;
  }

  .hero {
    padding-top: 115px;
  }

  .hero::before {
    background-size: 48px 48px;
  }

  h1 {
    margin-top: 22px;
    font-size: clamp(40px, 11.5vw, 58px);
    line-height: 1.17;
  }

  .hero-description {
    font-size: 15px;
  }

  .hero-meta {
    gap: 10px 15px;
  }

  .hero-visual {
    padding-bottom: 75px;
  }

  .app-window {
    border-radius: 12px;
  }

  .window-bar {
    height: 27px;
  }

  .window-title {
    font-size: 7px;
  }

  .floating-translate {
    right: 8px;
    bottom: 12px;
    width: min(280px, 78%);
  }

  .floating-audio {
    top: -12px;
    left: 8px;
  }

  .tech-strip {
    min-height: 110px;
    flex-direction: column;
    justify-content: center;
    gap: 13px;
    padding: 20px 0;
  }

  .tech-list {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .tech-list > span {
    font-size: 11px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 36px;
  }

  .section-heading h2,
  .modes-heading h2,
  .architecture-copy h2,
  .developer-copy h2 {
    font-size: 34px;
  }

  .section-heading > p {
    max-width: 560px;
  }

  .features-section {
    padding-top: 85px;
  }

  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-large,
  .feature-voice {
    grid-column: span 2;
  }

  .feature-card {
    min-height: 290px;
    padding: 25px;
  }

  .feature-subtitles {
    grid-template-columns: 1fr 1fr;
  }

  .feature-card h3 {
    font-size: 20px;
  }

  .feature-privacy {
    grid-column: span 2;
    min-height: 280px;
  }

  .feature-models {
    grid-column: span 2;
    min-height: 270px;
  }

  .preview-heading {
    gap: 28px;
  }

  .preview-tabs {
    justify-self: start;
  }

  .preview-stage {
    border-radius: 12px;
  }

  .preview-toolbar {
    height: 34px;
    padding: 0 12px;
  }

  .preview-caption {
    font-size: 10px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .step-card {
    min-height: 280px;
  }

  .developer-card {
    width: calc(100% - 32px);
    gap: 38px;
    padding: 38px 28px;
    border-radius: 24px;
  }

  .footer-main {
    grid-template-columns: 0.75fr 1.25fr;
    gap: 30px;
  }

  .footer-links {
    gap: 18px;
  }
}

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

  .hero {
    padding-top: 105px;
  }

  h1 {
    font-size: clamp(32px, 9.4vw, 38px);
  }

  .hero-actions .button {
    flex: 1;
    padding: 0 15px;
  }

  .hero-meta {
    font-size: 10px;
  }

  .window-live,
  .preview-platform {
    display: none;
  }

  .window-title {
    padding-right: 32px;
  }

  .floating-audio {
    padding: 8px 10px;
  }

  .floating-audio > span {
    display: none;
  }

  .floating-translate {
    padding: 12px 14px;
  }

  .language-row strong {
    font-size: 10px;
  }

  .tech-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 22px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-large,
  .feature-voice,
  .feature-privacy,
  .feature-models {
    grid-column: 1;
  }

  .feature-card {
    min-height: 0;
  }

  .feature-subtitles {
    display: block;
  }

  .subtitle-demo {
    margin-top: 25px;
  }

  .feature-voice {
    padding-bottom: 100px;
  }

  .mode-item {
    grid-template-columns: 27px 1fr auto;
    gap: 10px;
  }

  .mode-route {
    flex-wrap: wrap;
  }

  .mode-tag {
    font-size: 8px;
  }

  .preview-caption > span:last-child {
    display: none;
  }

  .flow-card {
    padding: 18px;
  }

  .flow-node {
    padding: 12px;
  }

  .flow-branches {
    gap: 8px;
  }

  .flow-branches .flow-node {
    gap: 8px;
  }

  .flow-branches .model-symbol {
    width: 32px;
    height: 32px;
  }

  .flow-output {
    gap: 6px;
  }

  .developer-actions .button {
    width: 100%;
  }

  .clone-command {
    padding: 18px 12px;
  }

  .clone-command code {
    font-size: 8px;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-links {
    margin-top: 10px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

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

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
