:root {
  --bg: #0c0c0e;
  --bg-elevated: #131316;
  --surface: rgba(255, 255, 255, 0.025);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f0f0f2;
  --text-secondary: #9fa0a7;
  --text-tertiary: #6b6b72;
  --accent: #d4a574;
  --accent-hover: #e2b78a;
  --accent-dim: rgba(212, 165, 116, 0.1);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", "Menlo", "Noto Sans SC", monospace;
  --font-body: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Subtle grain texture ─── */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(12, 12, 14, 0.72);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
}

.logo-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.85rem;
}

.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-small {
  padding: 7px 16px;
  font-size: 0.75rem;
  background: transparent;
  color: var(--accent);
  border-color: var(--border-strong);
}

.btn-small:hover {
  background: var(--accent-dim);
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-text {
  padding: 11px 0;
  color: var(--text-secondary);
  background: transparent;
}

.btn-text:hover {
  color: var(--accent);
}

.btn-disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.55;
  background: var(--surface);
  color: var(--text-tertiary);
  border-color: var(--border);
}

.btn-disabled.btn-primary {
  background: var(--surface);
  color: var(--text-tertiary);
}

.footer-disabled {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

/* ─── Typography ─── */
.eyebrow {
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.section-intro {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  margin-top: 12px;
}

/* ─── Hero ─── */
.hero {
  padding: 170px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

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

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.title-highlight {
  color: var(--accent);
}

.hero-body {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.75;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
}

.hero-meta {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ─── Bento visual ─── */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento {
  position: relative;
  width: min(420px, 92vw);
  aspect-ratio: 5 / 4;
}

.bento-cell {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.bento-cell:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.cell-label {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.cell-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.cell-1 { top: 0; left: 0; width: 48%; }
.cell-2 { top: 0; right: 0; width: 48%; }
.cell-3 { top: 38%; left: 18%; width: 46%; z-index: 2; background: rgba(19, 19, 22, 0.95); }
.cell-4 { bottom: 0; left: 0; width: 48%; }
.cell-5 { bottom: 0; right: 0; width: 48%; }

.bento-lines {
  position: absolute;
  inset: 0;
  stroke: var(--border-strong);
  stroke-width: 1;
  pointer-events: none;
}

/* ─── Announcement ─── */
.announcement {
  padding: 24px 0 70px;
}

.announcement-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.pill {
  flex-shrink: 0;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.announcement-inner p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ─── Sections ─── */
.section-header {
  margin-bottom: 56px;
}

.engine {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

/* ─── Engine accordion ─── */
.engine-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.engine-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease;
}

.engine-row:first-child {
  border-top: 1px solid var(--border);
}

.engine-row:hover {
  background: linear-gradient(90deg, var(--accent-dim), transparent 55%);
}

.engine-row summary {
  display: grid;
  grid-template-columns: 56px 140px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 32px 0;
  list-style: none;
  cursor: pointer;
  outline: none;
}

.engine-row summary::-webkit-details-marker {
  display: none;
}

.engine-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.engine-name {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
}

.engine-tagline {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 500;
}

.engine-cue {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}

.engine-row:hover .engine-cue,
.engine-row[open] .engine-cue {
  color: var(--accent);
}

.engine-body {
  padding: 0 0 44px 144px;
  animation: fadeIn 0.3s ease;
}

.engine-body-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.engine-body-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.engine-body-grid p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Compare ─── */
.compare {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.compare-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background 0.2s ease;
}

.compare-row:last-child {
  border-bottom: none;
}

.compare-row:not(.compare-header):hover {
  background: var(--surface);
}

.compare-header {
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.compare-cell {
  font-size: 0.95rem;
  line-height: 1.55;
}

.compare-cell.dim {
  color: var(--text-tertiary);
}

/* ─── Claude Code comparison section ─── */
.claude-compare code {
  font-family: var(--font-mono);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.88em;
}

.claude-compare .compare-footnote {
  margin-top: 24px;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .claude-compare .compare-row .compare-cell:nth-child(2)::before { content: "Claude Code"; }
  .claude-compare .compare-row .compare-cell:nth-child(3)::before { content: "Hypnos"; }
}

/* ─── Scenarios ─── */
.scenarios {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.scenario-card {
  display: block;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.scenario-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.scenario-card h4 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.scenario-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ─── Facts ─── */
.facts {
  padding: 80px 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fact-number {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.fact-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ─── Security ─── */
.security {
  padding: 120px 0;
}

.security-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
}

.security-copy .section-title {
  margin-bottom: 12px;
}

.security-list {
  list-style: none;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.security-list li {
  position: relative;
  padding-left: 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.security-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.security-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: radial-gradient(circle, var(--accent-dim), transparent 65%);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ─── Download ─── */
.download {
  padding: 120px 0;
}

.download-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 48px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.download-copy {
  max-width: 440px;
}

.download-copy .section-title {
  margin-bottom: 10px;
}

.download-copy p {
  color: var(--text-secondary);
}

.download-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.download-meta {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

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

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

.footer-links {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

.footer-copy {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ─── Detail pages ─── */
.detail {
  padding: 160px 0 100px;
  border-top: 1px solid var(--border);
}

.detail-content {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.85;
  font-size: 1rem;
}

.detail-content h3 {
  font-family: var(--font-mono);
  color: var(--text);
  margin: 44px 0 16px;
  font-size: 1.15rem;
  font-weight: 600;
}

.detail-content p {
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.detail-content p:last-child {
  margin-bottom: 0;
}

.detail-content ul {
  margin: 12px 0 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-content li {
  padding-left: 4px;
}

.detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 760px;
  margin: 56px auto 0;
  flex-wrap: wrap;
}

.detail-actions .btn {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .detail {
    padding: 120px 0 72px;
  }

  .detail-content {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .detail-content h3 {
    font-size: 1.05rem;
    margin: 28px 0 12px;
  }

  .detail-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 40px;
  }

  .detail-actions .btn {
    width: auto;
    max-width: none;
  }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .engine-row summary {
    grid-template-columns: 56px 110px 1fr auto;
    gap: 16px;
  }

  .engine-name {
    font-size: 1.1rem;
  }

  .engine-body {
    padding: 0 0 36px 106px;
  }

  .engine-body-grid {
    grid-template-columns: 1fr;
  }

  .scenario-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .security-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .security-visual {
    order: -1;
  }

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

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .nav-inner {
    padding: 14px 16px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 120px 0 48px;
  }

  .hero-title {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  .hero-body {
    font-size: 1rem;
  }

  .engine,
  .compare,
  .scenarios,
  .download {
    padding: 72px 0;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .section-title {
    font-size: clamp(1.45rem, 6vw, 2rem);
  }

  .section-intro {
    font-size: 0.95rem;
  }

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

  .hero-actions .btn {
    width: 100%;
    max-width: none;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .bento {
    aspect-ratio: auto;
    height: 320px;
  }

  .bento-cell {
    padding: 12px;
  }

  .cell-label {
    font-size: 0.85rem;
  }

  .cell-desc {
    font-size: 0.7rem;
  }

  .engine-row summary {
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
    padding: 24px 0;
  }

  .engine-index {
    display: none;
  }

  .engine-name {
    grid-column: 1 / -1;
    font-size: 1.15rem;
  }

  .engine-tagline {
    grid-column: 1 / -1;
    font-size: 0.9rem;
    color: var(--text-secondary);
  }

  .engine-body-grid h4 {
    font-size: 0.88rem;
  }

  .engine-body-grid p {
    font-size: 0.85rem;
  }

  .engine-body {
    padding: 0 0 28px 0;
  }

  .compare-table {
    gap: 14px;
    background: transparent;
    border: none;
  }

  .compare-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .compare-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
  }

  .compare-header {
    display: none;
  }

  .compare-cell {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .compare-row .compare-cell:nth-child(1) {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
  }

  .compare-row .compare-cell:nth-child(1)::before {
    content: "维度";
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 4px;
  }

  .compare-row .compare-cell:nth-child(2),
  .compare-row .compare-cell:nth-child(3) {
    position: relative;
    padding-left: 16px;
  }

  .compare-row .compare-cell:nth-child(2)::before,
  .compare-row .compare-cell:nth-child(3)::before {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 5px;
  }

  .compare-row .compare-cell:nth-child(2)::before { content: "普通 API + 提示词"; }
  .compare-row .compare-cell:nth-child(3)::before { content: "Hypnos 引擎"; }

  .compare-row .compare-cell:nth-child(2) {
    color: var(--text-tertiary);
    border-left: 2px solid var(--border);
  }

  .compare-row .compare-cell:nth-child(3) {
    color: var(--text);
    border-left: 2px solid var(--accent);
  }

  .scenario-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .scenario-card {
    padding: 20px;
  }

  .scenario-card h4 {
    font-size: 0.92rem;
  }

  .scenario-card p {
    font-size: 0.86rem;
  }

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

  .download-panel {
    padding: 28px 20px;
  }

  .download-action {
    width: 100%;
  }

  .download-action .btn {
    width: 100%;
    max-width: none;
  }

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

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }
}
