/* ============================================================
   PAGE: LANDING (#/) — marketing site (page-home.js)
   Isolated from app.css's .home__ uploader styles, which the
   generate page (#/generate) still owns. Tokens come from app.css.
   ============================================================ */

.landing {
  max-width: var(--max);
  margin: 0 auto;
}

/* ---- B. Hero ------------------------------------------------- */
.lp-hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--s-7);
  align-items: center;
  padding: var(--s-7) 0 var(--s-8);
}
.lp-hero__brand {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--accent);
  margin-bottom: var(--s-3);
}
/* Reserve ~2 lines so the headline below doesn't jump as text types in. */
.lp-hero__tagline { min-height: 2.4em; }
.lp-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  background: currentColor;
  vertical-align: -2px;
  animation: lp-blink 1s steps(1, end) infinite;
}
@keyframes lp-blink { 50% { opacity: 0; } }
.lp-hero__title {
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -.01em;
  font-weight: 700;
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
}
.lp-hero__sub {
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 var(--s-6);
}
.lp-hero__cta { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.lp-hero__cta .btn svg,
.lp-footcta .btn svg { margin-right: 6px; vertical-align: -3px; }
.lp-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.lp-chip {
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}

/* Hero preview panel (capability-not-process) */
.lp-preview-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: 0 12px 40px -24px rgba(20, 30, 60, .35);
  overflow: hidden;
}
.lp-preview-panel__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.lp-preview-panel__dot {
  width: 9px; height: 9px; border-radius: 999px;
  background: var(--line-strong);
}
.lp-preview-panel__label {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.lp-preview-panel__body { padding: var(--s-4); display: grid; gap: var(--s-3); }
.lp-status-card {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.lp-status-card__check {
  flex: none;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
}
.lp-status-card__check svg { width: 16px; height: 16px; }
.lp-status-card__title { font-size: 14px; font-weight: 600; }
.lp-status-card__sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

/* ---- Shared section shell ----------------------------------- */
.lp-section {
  padding: var(--s-8) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--topbar-h) + 56px);
}
.lp-section__head { text-align: center; max-width: 640px; margin: 0 auto var(--s-6); }
.lp-section__title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: var(--s-2) 0 0;
}
.lp-section__sub { color: var(--ink-3); font-size: 15px; margin: var(--s-3) 0 0; }

/* ---- C. 核心能力 grid --------------------------------------- */
.lp-cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}
.lp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
  transition: border-color .15s var(--ease), transform .15s var(--ease),
              box-shadow .15s var(--ease);
}
.lp-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px -26px rgba(20, 30, 60, .4);
}
.lp-card__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-2);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--s-4);
}
.lp-card__title { font-size: 15px; font-weight: 600; margin: 0 0 var(--s-2); }
.lp-card__body { font-size: 13px; line-height: 1.65; color: var(--ink-3); margin: 0; }

/* ---- D. 优势对比 -------------------------------------------- */
.lp-vs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  align-items: stretch;
}
.lp-vs-col {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-6) var(--s-5);
}
.lp-vs-col--hot {
  border: 2px solid var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%);
  box-shadow: 0 18px 44px -28px rgba(30, 58, 138, .55);
  transform: translateY(-8px);
  z-index: 1;
}
.lp-vs-col__badge {
  position: absolute;
  top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 3px 12px;
  border-radius: 999px;
}
.lp-vs-col__title { font-size: 16px; font-weight: 700; margin: 0 0 var(--s-3); }
.lp-vs-col--hot .lp-vs-col__title { color: var(--accent-ink); }
.lp-vs-col__body { font-size: 13px; line-height: 1.7; color: var(--ink-3); margin: 0; }

/* ---- E. 硬核技术 -------------------------------------------- */
.lp-tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.lp-tile {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
}
.lp-tile__icon {
  flex: none;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-2);
  background: var(--accent-soft);
  color: var(--accent);
}
.lp-tile__title { font-size: 14px; font-weight: 600; margin: 2px 0 4px; }
.lp-tile__body { font-size: 12.5px; line-height: 1.6; color: var(--ink-3); margin: 0; }

/* ---- F. 成果预览 — faux document window --------------------- */
.lp-doc {
  max-width: 880px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: 0 26px 70px -36px rgba(20, 30, 60, .5);
}
/* window chrome */
.lp-doc__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.lp-doc__dot { width: 10px; height: 10px; border-radius: 999px; background: var(--line-strong); }
.lp-doc__dot:nth-child(1) { background: #e0897e; }
.lp-doc__dot:nth-child(2) { background: #e6c07a; }
.lp-doc__dot:nth-child(3) { background: #8fbf8f; }
.lp-doc__file {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: var(--s-3);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.lp-doc__file svg { width: 15px; height: 15px; color: var(--accent); }
.lp-doc__live {
  margin-left: auto;
  font-size: 11px; color: var(--ok);
  background: var(--ok-soft);
  padding: 2px 10px; border-radius: 999px;
}
/* two-pane body */
.lp-doc__body { display: grid; grid-template-columns: 220px 1fr; }
.lp-doc__toc {
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  padding: var(--s-4);
}
.lp-doc__toc-title {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: var(--s-3);
}
.lp-doc__toc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lp-doc__toc-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-3);
  padding: 6px 8px; border-radius: var(--r-1);
  line-height: 1.3;
}
.lp-doc__toc-item--active {
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 600;
}
.lp-doc__toc-check {
  flex: none; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ok);
}
.lp-doc__toc-check svg { width: 14px; height: 14px; }
.lp-doc__toc-item--active .lp-doc__toc-check { color: var(--accent); }
/* page — top half solid, fading toward the bottom so it reads like a longer
   document continuing below. Mask only fades the content; the white window
   surface stays, so text dissolves into the page. */
.lp-doc__page {
  padding: var(--s-5) var(--s-6);
  min-width: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 100%);
}
.lp-doc__chapter { font-size: 12px; letter-spacing: .04em; color: var(--ink-4); }
.lp-doc__h { font-size: 17px; font-weight: 700; margin: 4px 0 var(--s-3); }
.lp-doc__p { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); margin: 0 0 var(--s-4); }
/* 评分项响应 callout */
.lp-eval {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--accent-soft);
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  border-radius: var(--r-2);
  margin-bottom: var(--s-4);
}
.lp-eval__badge {
  flex: none;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: #fff; background: var(--accent);
  padding: 3px 8px; border-radius: var(--r-1);
}
.lp-eval__title { font-size: 13px; font-weight: 600; }
.lp-eval__sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.lp-eval__ok {
  flex: none; margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--ok);
  white-space: nowrap;
}
.lp-eval__ok svg { width: 14px; height: 14px; }
/* 核心参数响应承诺表 */
.lp-doc__tabletitle { font-size: 13px; font-weight: 600; margin-bottom: var(--s-2); }
.lp-doc__tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-2); }
.lp-doc__table { width: 100%; border-collapse: collapse; font-size: 12px; }
.lp-doc__table th {
  text-align: left; font-weight: 600; color: var(--ink-3);
  background: var(--surface-2);
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.lp-doc__table td {
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  color: var(--ink-2); line-height: 1.5; vertical-align: top;
}
.lp-doc__table tr:last-child td { border-bottom: none; }
.lp-doc__td-n { color: var(--ink-4); font-variant-numeric: tabular-nums; }
.lp-doc__td-cite { color: var(--accent); white-space: nowrap; }
.lp-doc__cites { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.lp-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--line);
}
.lp-tag svg { width: 13px; height: 13px; }
.lp-tag--cite { background: var(--surface-2); color: var(--ink-3); }
.lp-tag--cite svg { color: var(--accent); }
/* footer status strip */
.lp-doc__foot {
  display: flex; flex-wrap: wrap; gap: var(--s-5);
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.lp-doc__stat { display: flex; flex-direction: column; }
.lp-doc__stat-v { font-size: 16px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.lp-doc__stat-l { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* ---- G. 常见问题 -------------------------------------------- */
.lp-faq { max-width: 760px; margin: 0 auto; display: grid; gap: var(--s-3); }
.lp-faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
}
.lp-faq__q {
  display: flex; align-items: center; gap: var(--s-3);
  font-size: 15px; font-weight: 600;
}
.lp-faq__qmark {
  flex: none;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-1);
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700;
}
.lp-faq__a { font-size: 13px; line-height: 1.7; color: var(--ink-3); margin: var(--s-3) 0 0 34px; }

/* ---- H. 底部 CTA -------------------------------------------- */
.lp-footcta {
  text-align: center;
  padding: var(--s-8) var(--s-5) var(--s-9);
  margin-top: var(--s-7);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--bg));
  border-radius: var(--r-3);
}
.lp-footcta__title { font-size: 26px; font-weight: 700; margin: 0 0 var(--s-3); }
.lp-footcta__sub { color: var(--ink-3); font-size: 15px; margin: 0 0 var(--s-5); }

/* ---- Responsive --------------------------------------------- */
@media (max-width: 960px) {
  .lp-hero { grid-template-columns: 1fr; gap: var(--s-6); padding-top: var(--s-5); }
  .lp-cap-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-tech-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .lp-hero__brand { font-size: 28px; }
  .lp-hero__title { font-size: 24px; }
  .lp-section__title, .lp-footcta__title { font-size: 22px; }
  .lp-cap-grid, .lp-tech-grid, .lp-vs-grid { grid-template-columns: 1fr; }
  .lp-vs-col--hot { transform: none; }   /* no lift when stacked */
  /* document window: stack outline above the page */
  .lp-doc__body { grid-template-columns: 1fr; }
  .lp-doc__toc { border-right: none; border-bottom: 1px solid var(--line); }
  .lp-doc__toc-list { grid-auto-flow: column; grid-auto-columns: max-content;
    overflow-x: auto; gap: var(--s-3); }
  .lp-doc__page { padding: var(--s-4); }
  .lp-eval { flex-wrap: wrap; }
  .lp-eval__ok { margin-left: 0; }
}

/* ============================================================
   Processing page (生成中) — animated progress bar + stepper /
   live-log polish.  feat/processing-page-ui, 2026-06-10.
   The animated bar is the only NEW CSS; the .stepper / .log
   classes are reused verbatim from app.css.  All rules are
   scoped to .processing-card / .proc-steps-card so the
   detail-page progress bar is untouched.
   ============================================================ */

/* Taller bar so the stripes / sweep / cap read clearly
   (app.css base .progress__bar is only 4px). */
.processing-card .progress__bar {
  height: 10px;
  background: var(--bg-soft);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
  position: relative;
}
.processing-card .progress__fill {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px rgba(30, 58, 138, .12);
  transition: width .9s var(--ease);
}

/* Layer 1 — moving diagonal "barber-pole" stripes inside the fill */
.processing-card .progress__fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    115deg,
    rgba(255, 255, 255, .18) 0 12px,
    rgba(255, 255, 255, 0) 12px 28px
  );
  background-size: 40px 100%;
  animation: procStripes 1.1s linear infinite;
}
@keyframes procStripes {
  from { background-position: 0 0; }
  to   { background-position: 40px 0; }
}

/* Layer 2 — traveling glossy highlight sweeping across the fill.
   Overrides app.css's global shimmer ::after inside our scope. */
.processing-card .progress__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, .55) 50%,
    transparent 100%
  );
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: procSweep 1.9s var(--ease) infinite;
}
@keyframes procSweep {
  from { background-position: -60% 0; }
  to   { background-position: 160% 0; }
}

/* Leading-edge glow dot. The mockup nests this inside .progress__fill
   (which is overflow:hidden, clipping the dot's outer half); we instead
   mount it as a sibling in .progress__bar and ride the leading edge via
   a JS-set left:% so the full glow shows. */
.processing-card .progress__cap {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%);
  transform: translateY(-50%);
  transition: left .9s var(--ease);
  pointer-events: none;
  z-index: 2;
  animation: procCap 1.2s ease-in-out infinite;
}
@keyframes procCap {
  0%, 100% { opacity: .35; transform: translateY(-50%) scale(.8); }
  50%      { opacity: 1;   transform: translateY(-50%) scale(1.15); }
}

/* Active step dot — gentle breathing ring */
.proc-steps-card .step.is-active .step__dot {
  animation: procDot 1.6s ease-in-out infinite;
}
@keyframes procDot {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
  50%      { box-shadow: 0 0 0 8px var(--accent-soft); }
}

/* 4-step stepper (app.css base is 5 columns). Scoped above the 720px
   mobile breakpoint so it doesn't out-specify app.css's mobile rule
   (.stepper → 1fr), which collapses the stepper to stacked rows. */
@media (min-width: 721px) {
  .proc-steps-card .stepper { grid-template-columns: repeat(4, 1fr); }
}

/* freeze all motion + hide the cap on terminal states */
.processing-card.is-done .progress__fill::before,
.processing-card.is-done .progress__fill::after,
.processing-card.is-failed .progress__fill::before,
.processing-card.is-failed .progress__fill::after {
  animation: none;
  display: none;
}
.processing-card.is-done .progress__cap,
.processing-card.is-failed .progress__cap {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .processing-card .progress__fill::before,
  .processing-card .progress__fill::after,
  .processing-card .progress__cap,
  .proc-steps-card .step.is-active .step__dot {
    animation: none !important;
  }
}
