/* ══════════════════════════════════════════════════════════════════════
   MARKETING — shared chrome for the landing / 功能 / 展示 pages.

   Extends the same token set as the app (base.css). No new colours, no new
   radii: everything reads var(--accent*) / var(--bg-*) so all four themes and
   six accents keep working, and corners stay on the 9 / 12 / 16px scale.
   ══════════════════════════════════════════════════════════════════════ */

/* ── The accent thread ──────────────────────────────────────────────────
   A drawn line that runs the height of the page, turns at each section and
   crosses its own second lead between them. Sits above the ambient wash
   (body::before, z-index 0) but below all content (body > *, z-index 1). */

.thread-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.thread-layer svg { display: block; }
.thread-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.16;
  transition: stroke-dashoffset 0.12s linear;
}
.thread-path:nth-child(2) { stroke-width: 2; opacity: 0.085; }
.thread-node {
  fill: var(--bg-deep);
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0.2;
  transition: opacity 0.5s var(--ease-out), r 0.5s var(--ease-spring);
}
.thread-node.is-lit { opacity: 0.75; r: 6; }

/* ── Navigation ── */

.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-link {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.is-active { color: var(--text-main); }
.nav-right { display: flex; align-items: center; gap: 1rem; }

.nav-burger {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
}
.nav-burger:hover { background: var(--bg-panel-hover); border-color: var(--border-highlight); }

#nav-scrim {
  position: fixed; inset: 0;
  z-index: 1400;
  background: rgba(5, 6, 9, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s var(--ease-out);
}
#nav-scrim.is-open { opacity: 1; pointer-events: auto; }

#nav-drawer {
  position: fixed;
  top: 0; right: 0;
  z-index: 1500;
  width: min(320px, 84vw);
  height: 100%;
  display: flex; flex-direction: column; gap: 6px;
  padding: calc(1.25rem + env(safe-area-inset-top)) 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform 0.34s var(--ease-spring);
}
#nav-drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.drawer-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 14px;
  min-height: 48px;                       /* comfortable touch target */
  border-radius: var(--radius);
  color: var(--text-main);
  font-size: 1rem; font-weight: 600;
  transition: var(--transition-fast);
}
.drawer-link:hover { background: var(--bg-panel-hover); }
.drawer-link svg { color: var(--text-muted); flex-shrink: 0; }
.drawer-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* ── Section headings ── */

.section-head { max-width: 40rem; margin-bottom: 3.5rem; }
.section-head.is-center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  display: block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.section-head h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-top: 0.85rem; letter-spacing: -0.03em; }
.section-head p { color: var(--text-dim); font-size: 1.05rem; margin-top: 1rem; line-height: 1.75; }

/* A hairline chip — used for the hero eyebrow and small status flags. Kept
   separate from base.css's `.eyebrow` so the mono editorial label survives. */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-dim);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.01em;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.section-block { margin-bottom: 7rem; position: relative; }

/* ── Bento feature grid ── */

/* Four columns: the two `is-wide` cells fill row one, the four plain cells fill
   row two. A six-column grid left the sixth cell stranded on a row of its own. */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.bento-cell {
  grid-column: span 1;
  display: flex; flex-direction: column;
  padding: 1.9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), var(--edge-highlight);
  transition: var(--transition);
}
.bento-cell:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-md), var(--edge-highlight);
  transform: translateY(-3px);
}
.bento-cell.is-wide { grid-column: span 2; }
.bento-cell h4 { font-size: 1.2rem; margin-bottom: 0.7rem; }
.bento-cell p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.75; }

.feature-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.15rem;
  border-radius: var(--radius);
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--accent);
  transition: var(--transition-fast);
}
.bento-cell:hover .feature-icon { border-color: var(--accent-line); }

/* ── Illustration frame ── */

.art-frame {
  display: block;
  margin-top: auto;
  padding-top: 1.5rem;
  color: var(--text-dim);
}
.art-frame svg { width: 100%; height: auto; display: block; }
.art-panel {
  padding: 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-dim);
}
.art-panel svg { width: 100%; height: auto; display: block; }

/* ── Mode comparison ── */

.compare-wrap {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--edge-highlight);
  overflow-x: auto;                       /* the table scrolls, never the page */
}
.compare-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.compare-table th, .compare-table td {
  padding: 1.1rem 1.35rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
}
.compare-table thead th {
  font-family: var(--font-heading);
  font-size: 1rem; font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.compare-table thead th:first-child {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted);
}
.compare-table tbody th {
  font-weight: 600; color: var(--text-dim);
  font-size: 0.86rem; width: 26%;
}
.compare-table td { color: var(--text-main); }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: 0; }
.compare-table .is-featured { background: var(--accent-softer); }
.compare-yes { color: var(--accent); font-weight: 700; }
.compare-no { color: var(--text-muted); }

/* ── FAQ ── */

.faq { max-width: 46rem; margin: 0 auto; }

/* ── CTA band ── */

.cta-band {
  text-align: center;
  padding: 5rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-highlight);
  background: radial-gradient(120% 140% at 50% 0%, var(--accent-soft), transparent 62%), var(--bg-surface);
  box-shadow: var(--edge-highlight);
}
.cta-band h2 { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -0.03em; }

/* ── Anchor rail (功能 page) ── */

.rail-layout { display: grid; grid-template-columns: 210px 1fr; gap: 4rem; align-items: start; }
.rail { position: sticky; top: 6.5rem; display: flex; flex-direction: column; gap: 2px; }
.rail-link {
  padding: 10px 14px;
  border-left: 2px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.88rem; font-weight: 600;
  transition: var(--transition-fast);
}
.rail-link:hover { color: var(--text-dim); border-left-color: var(--border-highlight); }
.rail-link.is-active { color: var(--accent); border-left-color: var(--accent); }

/* ── Footer ── */

.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 4.5rem 0 calc(3rem + env(safe-area-inset-bottom));
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 3rem;
  max-width: 1100px; margin: 0 auto; padding: 0 2rem;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 6px 0;
  transition: var(--transition-fast);
}
.footer-col a:hover { color: var(--text-main); }
.footer-brand p { color: var(--text-muted); font-size: 0.86rem; line-height: 1.75; margin-top: 1rem; max-width: 22rem; }
.footer-base {
  max-width: 1100px; margin: 3rem auto 0; padding: 2rem 2rem 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted); font-size: 12px;
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .rail-layout { grid-template-columns: 1fr; gap: 2rem; }
  .rail {
    position: static;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .rail-link {
    border-left: 0;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
  }
  .rail-link.is-active { border-bottom-color: var(--accent); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-cell { grid-column: span 1; }
  .bento-cell.is-wide { grid-column: span 2; }
  .section-block { margin-bottom: 5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.25rem; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento-cell, .bento-cell.is-wide { grid-column: span 1; }
  .cta-band { padding: 3.25rem 1.4rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .section-head { margin-bottom: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .thread-path { transition: none; }
  .thread-node { transition: none; }
  .bento-cell:hover { transform: none; }
  #nav-drawer { transition: none; }
}
