/* Gallop — www.gallex.top
   Monet purple field, serif headlines, no gradient chrome. */

:root {
  --bg: #07060b;
  --bg-elev: #100e16;
  --ink: #f3efe8;
  --ink-dim: #9b93a6;
  --ink-mute: #6d6678;
  --line: rgba(196, 176, 232, 0.16);
  --monet: #6b4d9a;
  --monet-deep: #4e3676;
  --monet-mid: #8a6bb5;
  --monet-mist: #d9ccec;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", Palatino, "Palatino Linotype", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1120px;
  --header: 64px;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--monet);
  color: #fff;
  padding: 8px 12px;
  z-index: 200;
}
.skip-link:focus { top: 12px; }

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

/* Header — Trae: thin, left wordmark, center links, right CTA */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header);
  z-index: 50;
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(7, 6, 11, 0.88);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

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

.header-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1.5px;
  background: var(--ink);
}

.nav-toggle span:first-child { top: 13px; }
.nav-toggle span:last-child { top: 21px; }

/* Buttons — Trae solid rect + DeepSeek ghost. One fill color, no gradient. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-sm { padding: 9px 14px; font-size: 13px; }

.btn-fill {
  background: var(--monet);
  color: #fff;
}

.btn-fill:hover { background: var(--monet-mid); }

.btn-ghost {
  border: 1px solid rgba(243, 239, 232, 0.28);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover { background: rgba(243, 239, 232, 0.06); }

.btn-on-purple {
  background: var(--ink);
  color: var(--monet-deep);
}

.btn-on-purple:hover { background: #fff; }

/* Hero — Trae bottom bar + Hermes serif + Monet particle field */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--header);
  background:
    radial-gradient(ellipse 62% 48% at 62% 56%, rgba(107, 77, 154, 0.5), transparent 72%),
    radial-gradient(ellipse 40% 36% at 48% 62%, rgba(232, 222, 246, 0.12), transparent 70%),
    var(--bg);
  overflow: hidden;
}

.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
  /* 高斯模糊柔化流体层；transform 外扩避免模糊后边缘出现半透明黑边（.hero 已 overflow:hidden 裁掉外扩部分） */
  filter: blur(26px);
  transform: scale(1.12);
}

@media (max-width: 900px) {
  .hero-field { filter: blur(16px); }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 6, 11, 0.04) 0%, rgba(7, 6, 11, 0.12) 48%, rgba(7, 6, 11, 0.78) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-bar {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
  padding-top: 24px;
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--monet-mist);
  margin-bottom: 16px;
}

.kicker.light { color: var(--monet-mist); opacity: 0.9; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.hero-aside p {
  font-size: 15px;
  line-height: 1.75;
  color: #cfc6db;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.hero-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
}

/* Editorial blocks — DeepSeek / Hermes numbered sections */
.block {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.block-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 36px;
}

.idx {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--monet-mid);
  letter-spacing: 0.06em;
}

.block h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 56px;
  align-items: start;
}

.lead {
  font-size: 20px;
  line-height: 1.7;
  color: var(--ink);
}

.body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-dim);
  padding-top: 4px;
}

.plain-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plain-list li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-dim);
  padding-left: 16px;
  border-left: 1px solid var(--monet);
}

.who-list {
  max-width: 720px;
}

.who-list li {
  font-size: 18px;
  color: var(--ink);
}

.lede-note {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-dim);
  max-width: 40em;
  margin-top: 40px;
}

.cap-list {
  border-top: 1px solid var(--line);
}

.cap-row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px 48px;
  align-items: baseline;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.cap-row h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
}

.cap-row p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-dim);
}

.diagram {
  color: var(--monet-mist);
  border: 1px solid var(--line);
  padding: 20px 16px 8px;
  background: var(--bg-elev);
}

.diagram svg {
  width: 100%;
  height: auto;
  display: block;
  font-family: var(--mono);
}

/* Download band — Hermes color field, Monet */
.download {
  background: var(--monet);
  color: var(--ink);
  padding: 88px 0;
}

.download h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  margin: 8px 0 16px;
}

.download-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.download-inner > div:first-child p:not(.kicker) {
  font-size: 16px;
  line-height: 1.7;
  color: var(--monet-mist);
  max-width: 36em;
}

.os-list {
  border-top: 1px solid rgba(243, 239, 232, 0.22);
  margin-bottom: 24px;
}

.os-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(243, 239, 232, 0.22);
  font-size: 14px;
}

.os-list li span:last-child {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--monet-mist);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 48px;
}

.footer-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-dim);
}

.site-footer h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--ink);
}

.site-footer li {
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 8px;
  line-height: 1.5;
}

.site-footer a:hover { color: var(--monet-mist); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-mute);
}

.icp-link { color: var(--ink-dim); }
.icp-link:hover { color: var(--monet-mist); text-decoration: underline; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 6, 11, 0.72);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(440px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 32px 28px 28px;
  position: relative;
}

.modal-wide { width: min(640px, 100%); }

.modal h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 12px;
}

.modal > p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-dim);
  margin-bottom: 20px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  font-size: 22px;
  color: var(--ink-dim);
}

.modal-close:hover { color: var(--ink); }

.notify-form {
  display: flex;
  gap: 8px;
}

.notify-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.notify-form input:focus { border-color: var(--monet-mid); }

.legal-body {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-dim);
  max-height: 420px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.toast-msg {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 18px;
  font-size: 13px;
  z-index: 90;
  transition: transform 0.25s ease;
  pointer-events: none;
}

.toast-msg.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7, 6, 11, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; }
  .nav-toggle { display: block; }
  .hero-bar,
  .split,
  .download-inner,
  .footer-grid,
  .cap-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .cap-row { gap: 8px; padding: 24px 0; }
  .who-list li { font-size: 16px; }
  .hero { min-height: 92vh; }
  .hero-bar { margin-bottom: 32px; }
  .block { padding: 64px 0; }
  .header-end .btn { display: none; }
}

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