:root {
  --bg: #FAF8F5;
  --bg-alt: #F3EFE8;
  --surface: #FFFFFF;
  --well: #EFECE6;
  --ink: #1C1917;
  --ink-2: #4A4641;
  --ink-3: #635D56;
  --accent: #A8580D;
  --accent-soft: rgba(180, 101, 21, 0.11);
  --cta-bg: #B35E0B;
  --cta-hover: #9B5008;
  --cta-ink: #FFFFFF;
  --green: #1F6F3D;
  --border: rgba(28, 25, 23, 0.10);
  --border-strong: rgba(28, 25, 23, 0.17);
  --frame-shadow: 0 18px 46px -22px rgba(28, 25, 23, 0.18), 0 2px 8px -2px rgba(28, 25, 23, 0.06);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #141416;
    --bg-alt: #1A1A1E;
    --surface: #202026;
    --well: #2A2A32;
    --ink: #F4F4F6;
    --ink-2: #C4C4CE;
    --ink-3: #9B9BA8;
    --accent: #E59F49;
    --accent-soft: rgba(229, 159, 73, 0.14);
    --cta-bg: #B8650F;
    --cta-hover: #CB7216;
    --cta-ink: #FFFFFF;
    --green: #4ADE80;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --frame-shadow: 0 24px 56px -24px rgba(0, 0, 0, 0.68), 0 2px 10px -2px rgba(0, 0, 0, 0.35);
  }
}

html[data-theme="dark"] {
  --bg: #141416;
  --bg-alt: #1A1A1E;
  --surface: #202026;
  --well: #2A2A32;
  --ink: #F4F4F6;
  --ink-2: #C4C4CE;
  --ink-3: #9B9BA8;
  --accent: #E59F49;
  --accent-soft: rgba(229, 159, 73, 0.14);
  --cta-bg: #B8650F;
  --cta-hover: #CB7216;
  --cta-ink: #FFFFFF;
  --green: #4ADE80;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --frame-shadow: 0 24px 56px -24px rgba(0, 0, 0, 0.68), 0 2px 10px -2px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 14px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 50;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand img {
  border-radius: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--ink-2);
}

.site-nav a {
  text-decoration: none;
  font-weight: 500;
  transition: color 150ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-link,
.toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.icon-link:hover,
.toggle-btn:hover {
  border-color: var(--border-strong);
  background: var(--well);
}

.lang-btn {
  min-width: 48px;
  color: var(--accent);
}

.theme-icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-icon-sun {
    display: none;
  }
  html:not([data-theme="light"]) .theme-icon-moon {
    display: block;
  }
}

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

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

/* Hero */
.hero {
  padding: clamp(40px, 6vw, 72px) 0 clamp(44px, 6vw, 68px);
}

.hero-copy {
  max-width: 820px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-logo {
  border-radius: 11px;
  box-shadow: 0 6px 16px -6px rgba(28, 25, 23, 0.25);
  flex-shrink: 0;
}

.meta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.meta-stack {
  font-size: 13px;
  color: var(--ink-3);
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: -0.028em;
  font-weight: 760;
  text-wrap: balance;
}

.hero-subtitle {
  margin: 0 0 28px;
  max-width: 68ch;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.btn-primary {
  background: var(--cta-bg);
  color: var(--cta-ink);
}

.btn-primary:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--well);
  transform: translateY(-1px);
}

.brew-shell {
  max-width: 720px;
  margin-bottom: 34px;
}

.brew-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}

.brew-prompt {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  user-select: none;
  flex-shrink: 0;
}

.brew-row code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink);
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
  scrollbar-width: none;
}

.brew-row code::-webkit-scrollbar {
  display: none;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--well);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.copy-btn:hover {
  border-color: var(--border-strong);
}

.copy-btn.copied {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 40%, transparent);
}

.brew-note {
  margin: 10px 2px 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: pretty;
}

.media-frame {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--frame-shadow);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 2400 / 860;
  object-fit: cover;
}

/* Sections */
.section {
  padding: clamp(52px, 6.5vw, 84px) 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.7vw, 2.05rem);
  line-height: 1.24;
  letter-spacing: -0.022em;
  font-weight: 720;
  text-wrap: balance;
}

.section-head p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  text-wrap: pretty;
}

/* Demos */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.demo-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-item img {
  width: 100%;
  aspect-ratio: 960 / 662;
  object-fit: cover;
}

.demo-caption h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.015em;
}

.demo-caption p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.pillar {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}

.pillar h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 680;
  letter-spacing: -0.015em;
}

.pillar p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: pretty;
}

.showcase-frame img {
  width: 100%;
  aspect-ratio: 2200 / 1320;
  object-fit: cover;
}

.frame-caption {
  padding: 12px 18px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Benchmarks */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 26px;
}

.stat-cell {
  padding: 20px;
  background: var(--surface);
}

.stat-value {
  font-size: clamp(1.3rem, 2.1vw, 1.7rem);
  font-weight: 760;
  letter-spacing: -0.025em;
  color: var(--accent);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.chart-frame {
  margin-bottom: 22px;
}

.chart-frame img {
  width: 100%;
  aspect-ratio: 2200 / 980;
  object-fit: cover;
}

.memory-note {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.memory-note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.memory-note-head h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 680;
}

.memory-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}

.memory-note p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Coexistence */
.coexist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.coexist-panel {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.coexist-lumen {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
}

.shortcut-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.kbd-combo {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  background: var(--well);
  border: 1px solid var(--border-strong);
  color: var(--ink);
}

.kbd-accent {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
  color: var(--accent);
}

.role-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}

.role-accent {
  color: var(--accent);
}

.coexist-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 680;
}

.coexist-panel p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Privacy */
.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.boundary-item {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.boundary-tag {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.boundary-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 680;
}

.boundary-item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.64;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.footer-brand img {
  border-radius: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.footer-links a {
  text-decoration: none;
  transition: color 150ms ease;
}

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

/* Responsive */
@media (max-width: 960px) {
  .site-nav {
    display: none;
  }

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

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 32px, 1120px);
  }

  .demo-grid,
  .coexist-grid,
  .boundary-grid,
  .stats-strip {
    grid-template-columns: 1fr;
  }

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

  .brew-row {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .brew-row code {
    flex-basis: calc(100% - 24px);
    white-space: normal;
    word-break: break-word;
    font-size: 12.5px;
    line-height: 1.5;
  }

  .copy-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
