/* ============================================================
   Marcel SSH — Official Website
   Monochrome dark aesthetic · zinc palette · smooth motion
   ============================================================ */

/* ---------- Font ---------- */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #09090b;
  --bg-soft: #0c0c0f;
  --surface: #131316;
  --surface-2: #18181b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #5b5b63;

  --green: #4ade80;
  --amber: #fbbf24;
  --orange: #fb923c;
  --red: #f87171;
  --blue: #94c3d9;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'Cascadia Code', 'JetBrains Mono', ui-monospace, Consolas,
    'SF Mono', monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 64px;
  --radius: 16px;
}

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

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

html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
button {
  font: inherit;
  cursor: pointer;
}

::selection {
  background: rgba(255, 255, 255, 0.9);
  color: #09090b;
}

/* ---------- Grain & cursor glow ---------- */
.grain {
  position: fixed;
  inset: -100%;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -8%); }
  30% { transform: translate(4%, -4%); }
  50% { transform: translate(-6%, 6%); }
  70% { transform: translate(6%, 2%); }
  90% { transform: translate(-3%, 7%); }
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.045) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
}

/* ---------- Layout ---------- */
.container {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.section {
  padding: 140px 0;
  position: relative;
}
.section-alt {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 255, 255, 0.025), transparent),
    var(--bg-soft);
  border-block: 1px solid var(--border);
}

/* ---------- Reveal animations ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms);
}
html.js .reveal[data-delay='1'] { --d: 1; }
html.js .reveal[data-delay='2'] { --d: 2; }
html.js .reveal[data-delay='3'] { --d: 3; }
html.js .reveal[data-delay='4'] { --d: 4; }
html.js .reveal[data-delay='5'] { --d: 5; }
html.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition:
    background 0.4s,
    border-color 0.4s,
    backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(9, 9, 11, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--border);
}
.nav-inner {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.nav-brand img {
  border-radius: 7px;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  padding: 7px 14px;
  font-size: 13.5px;
  color: var(--text-2);
  border-radius: 8px;
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-github {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--text-2);
  transition: color 0.25s;
}
.nav-github:hover {
  color: var(--text);
}

/* scroll progress line */
.nav-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
}
.nav-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(148, 195, 217, 0), rgba(148, 195, 217, 0.65) 60%, rgba(255, 255, 255, 0.9));
  transition: width 0.08s linear;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 550;
  font-size: 14px;
  border-radius: 10px;
  padding: 10px 20px;
  transition:
    transform 0.35s var(--ease-spring),
    box-shadow 0.35s,
    background 0.25s,
    border-color 0.25s;
  will-change: transform;
  white-space: nowrap;
}
.btn-primary {
  background: #fafafa;
  color: #09090b;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
}
.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.18);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 12px;
}
.btn-sm {
  padding: 7px 15px;
  font-size: 13px;
}
.btn-block {
  width: 100%;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 52px) 0 64px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.hero-orb-1 {
  width: 640px;
  height: 640px;
  top: -280px;
  left: 50%;
  margin-left: -480px;
  background: radial-gradient(circle, rgba(148, 195, 217, 0.09), transparent 70%);
  animation: orb-float 14s ease-in-out infinite;
}
.hero-orb-2 {
  width: 520px;
  height: 520px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(250, 250, 250, 0.05), transparent 70%);
  animation: orb-float 18s ease-in-out infinite reverse;
}
.hero-orb-3 {
  width: 420px;
  height: 420px;
  top: 340px;
  left: -180px;
  background: radial-gradient(circle, rgba(148, 195, 217, 0.055), transparent 70%);
  animation: orb-float 22s ease-in-out infinite;
}
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 20%, transparent 75%);
  will-change: transform;
}
.hero-beam {
  position: absolute;
  top: -180px;
  left: 50%;
  width: 560px;
  height: 620px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(148, 195, 217, 0.07), rgba(148, 195, 217, 0.015) 55%, transparent 85%);
  clip-path: polygon(42% 0, 58% 0, 92% 100%, 8% 100%);
  filter: blur(22px);
}

.hero-content {
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 14px;
  border-radius: 999px;
  transition: border-color 0.3s, color 0.3s;
}
.hero-badge:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.hero-kicker {
  margin: 20px 0 0;       /* 显式覆盖 UA 默认 h1 margin-block，避免撑出空隙 */
  font-size: inherit;     /* 显式重置 UA h1 字号，由 .kicker-main/.kicker-sub 控制 */
  font-weight: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.kicker-main {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}
.kicker-main em {
  font-style: normal;
  background: linear-gradient(120deg, var(--blue), #c9d8e4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.kicker-sub {
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-2);
}
.kicker-sub em {
  font-style: normal;
  background: linear-gradient(120deg, var(--blue), #a8c4d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--green);
  animation: pulse 2s var(--ease-out) infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.hero-title {
  margin-top: 8px;
  font-size: clamp(44px, 8.2vw, 96px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.06;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(120deg, #fafafa 20%, #94c3d9 50%, #fafafa 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
html.js .hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
html.js .hero-title .line > span {
  display: inline-block;
  transform: translateY(110%);
}
/* Safety: ensure reveal always wins for hero title spans */
html.js .hero-title .line > span.reveal.in {
  transform: translateY(0%) !important;
  opacity: 1 !important;
}

.hero-sub {
  margin-top: 24px;
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-2);
  line-height: 1.75;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.hero-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-3);
}

/* ---------- Terminal stage (demo window + floating tool chips) ---------- */
.term-stage {
  position: relative;
  margin: 68px auto 0;
  max-width: 780px;
}

.term-floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.float-chip {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(161, 161, 170, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(19, 19, 22, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  animation: chip-float 7s ease-in-out infinite;
}
.float-chip::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(148, 195, 217, 0.7);
  margin-right: 7px;
  vertical-align: 1px;
}
.fc-1 { top: -16px; left: -34px; animation-duration: 7.5s; }
.fc-2 { top: 26%; right: -74px; animation-duration: 9s; animation-delay: -2s; }
.fc-3 { bottom: 22%; left: -70px; animation-duration: 8s; animation-delay: -4s; }
.fc-4 { top: -20px; right: 10%; animation-duration: 10s; animation-delay: -1.4s; }
.fc-5 { bottom: -18px; right: -24px; animation-duration: 8.6s; animation-delay: -3s; }
.fc-6 { bottom: -14px; left: 16%; animation-duration: 9.4s; animation-delay: -5s; }
@keyframes chip-float {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50% { transform: translateY(-10px); opacity: 1; }
}

/* ---------- Terminal demo window ---------- */
.term-window {
  position: relative;
  text-align: left;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: rgba(13, 13, 16, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 120px rgba(148, 195, 217, 0.05);
  overflow: hidden;
  transform: perspective(1200px) rotateX(var(--tilt, 0deg)) translateY(var(--ty, 0px));
  will-change: transform;
}
.term-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c, #555);
  flex: none;
}
.term-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.term-agent-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--blue);
  border: 1px solid rgba(148, 195, 217, 0.3);
  background: rgba(148, 195, 217, 0.08);
  padding: 3px 8px;
  border-radius: 5px;
}
.term-body {
  padding: 20px 22px 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.85;
  min-height: 336px;
  white-space: pre-wrap;
  word-break: break-all;
}
.tl { display: block; }
.tl-cmd { color: #e4e4e7; }
.tl-cmd::before { content: '$ '; color: var(--green); }
.tl-agent { color: #e4e4e7; }
.tl-agent::before { content: '❯ '; color: var(--blue); }
.tl-ok { color: var(--green); }
.tl-dim { color: var(--text-3); }
.tl-plan { color: var(--blue); font-weight: 600; }
.tl-step { color: var(--text-2); padding-left: 2ch; }
.tl-step.done { color: var(--text-3); }
.tl-step.done i { color: var(--green); font-style: normal; }
.tl-step.active { color: var(--text); }
.tl-step.active i { color: var(--amber); font-style: normal; }
.tl-warn { color: var(--amber); }
.tl-danger { color: var(--red); padding-left: 2ch; }
.tl-btns { padding-left: 2ch; }
.tl-btns b {
  display: inline-block;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 1px 10px;
  margin-right: 8px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.tl-btns b.hl {
  color: #09090b;
  background: var(--green);
  border-color: var(--green);
}
.term-caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--text);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ---------- Scroll hint ---------- */
.scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  display: flex;
  justify-content: center;
}
.scroll-hint span {
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: var(--text-2);
  margin-top: 6px;
  animation: scroll-dot 1.8s var(--ease-out) infinite;
}
@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  border-block: 1px solid var(--border);
  padding: 20px 0;
  overflow: hidden;
  background: var(--bg-soft);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
}
.marquee-group span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-3);
  white-space: nowrap;
  text-transform: uppercase;
}
.marquee-group b {
  color: rgba(148, 195, 217, 0.4);
  font-size: 10px;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============================================================
   STATS
   ============================================================ */
.stats {
  padding: 96px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat {
  text-align: center;
  position: relative;
}
.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  height: 56px;
  width: 1px;
  background: var(--border);
}
.stat-num {
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-num i {
  font-style: normal;
  font-size: 0.55em;
  color: var(--text-2);
  margin-left: 2px;
}
.stat-label {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-3);
}

/* ============================================================
   SECTION HEAD
   ============================================================ */
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 72px;
}
.section-head.align-left {
  text-align: left;
  margin: 0;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--blue);
  margin-bottom: 18px;
  min-height: 1.4em;
}
.section-head h2 {
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.14;
}
.section-head p {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 15.5px;
}

/* ============================================================
   BENTO
   ============================================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.bento-card {
  grid-column: span 2;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008));
  padding: 28px;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s var(--ease-out);
}
.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.055), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.bento-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.bento-card:hover::before {
  opacity: 1;
}
.bento-lg {
  grid-column: span 4;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 340px;
}
.bento-card h3 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.bento-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}
.bento-lg h3 {
  font-size: 24px;
}
.bento-lg p {
  font-size: 15px;
  max-width: 460px;
}

/* agent flow viz */
.agent-flow {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 40px;
  flex-wrap: wrap;
}
.flow-node {
  position: relative;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  white-space: nowrap;
}
.flow-active {
  border-color: rgba(148, 195, 217, 0.5);
  color: var(--blue);
}
.flow-ping {
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  border: 1px solid rgba(148, 195, 217, 0.5);
  animation: flowping 2.2s var(--ease-out) infinite;
}
@keyframes flowping {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
.flow-link {
  width: 34px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 5px, transparent 5px 10px);
  animation: dashmove 1.2s linear infinite;
}
@keyframes dashmove {
  to { background-position: 10px 0; }
}

/* plan list */
.plan-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.plan-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-3);
}
.plan-item i {
  font-style: normal;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex: none;
}
.plan-item.done i {
  color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.4);
}
.plan-item.active {
  color: var(--text-2);
}
.plan-item.active i {
  border: 1.5px solid var(--amber);
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* sftp demo */
.sftp-demo {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.sftp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  padding: 3px 0;
}
.sftp-ico {
  color: var(--blue);
}
.sftp-ico.file {
  color: var(--text-3);
}
.sftp-progress {
  margin-top: 10px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.sftp-progress span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--blue), #e4e4e7);
  animation: sftp-load 2.6s var(--ease-out) infinite;
}
@keyframes sftp-load {
  0% { width: 4%; }
  70% { width: 92%; }
  100% { width: 4%; }
}

/* chips */
.chip-row {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 11px;
  border-radius: 7px;
}
.chip-dim {
  color: var(--text-3);
}

/* ============================================================
   THESIS — 生于 Agent，不止于 Agent（scroll-pinned scrollytelling）
   ============================================================ */
.thesis-pin {
  position: relative;
  /* height set by JS = N * 100vh; falls back to auto on mobile/reduced-motion */
}
.thesis-pin-inner {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
}
.thesis-stage {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 72px;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  align-items: center;
}

/* LEFT — pinned manifesto */
.thesis-left { padding-right: 8px; }
.thesis-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--blue);
  margin-bottom: 20px;
}
.thesis-title {
  font-size: clamp(46px, 6.8vw, 82px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin-bottom: 28px;
}
.thesis-title em {
  font-style: normal;
  background: linear-gradient(180deg, var(--blue), #5b8fa8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.thesis-lead {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.78;
  max-width: 420px;
  margin-bottom: 44px;
}
.thesis-progress {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--border);
  padding-left: 22px;
  position: relative;
}
.thesis-progress::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: var(--p, 0%);
  background: var(--blue);
  transition: height 0.35s linear;
}
.tp-dot {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  color: var(--text-3);
  padding: 9px 0;
  transition: color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.tp-dot i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11px;
  color: var(--text-3);
  transition: color 0.4s;
  min-width: 18px;
}
.tp-dot:hover { color: var(--text-2); }
.tp-dot.is-active {
  color: var(--text);
  transform: translateX(5px);
}
.tp-dot.is-active i { color: var(--blue); }

/* RIGHT — accordion, one panel unfolds at a time */
.thesis-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - var(--nav-h) - 56px);
  overflow: hidden;
}
.pillar {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.005));
  overflow: hidden;
  transition: border-color 0.4s var(--ease-out), background 0.4s var(--ease-out);
  flex: none;
}
.pillar.is-active {
  border-color: var(--border-strong);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(148, 195, 217, 0.06), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008));
}
.pillar-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  cursor: pointer;
  user-select: none;
}
.pillar-no {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  transition: color 0.4s;
  flex: none;
  min-width: 20px;
}
.pillar.is-active .pillar-no { color: var(--blue); }
.pillar-head h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
  flex: 1;
  transition: color 0.4s;
}
.pillar.is-active .pillar-head h3 { color: var(--text); }
.pillar-chev {
  color: var(--text-3);
  flex: none;
  transition: transform 0.45s var(--ease-out), color 0.4s;
}
.pillar.is-active .pillar-chev {
  transform: rotate(180deg);
  color: var(--blue);
}

/* folded body */
.pillar-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.65s var(--ease-out), opacity 0.45s var(--ease-out);
}
.pillar.is-active .pillar-body {
  max-height: 560px;
  opacity: 1;
}
.pillar-body-inner {
  padding: 4px 20px 22px;
  border-top: 1px solid var(--border);
}
.pillar-lead {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.7;
  margin: 16px 0 14px;
}
.pillar-lead code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--blue);
  background: rgba(148, 195, 217, 0.08);
  padding: 1px 6px;
  border-radius: 5px;
}

/* 2-col sub blocks (Agent / 插件) */
.pillar-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.pillar-sub {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.22);
}
.pillar-sub h4 {
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 6px;
}
.pillar-sub p {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.6;
  margin-bottom: 10px;
}
.pillar-sub .plan-list { margin-top: 8px; }
.pillar-sub .chip-row { margin-top: 8px; }
.pillar-sub .plan-item { font-size: 12px; }
.pillar-sub .chip { font-size: 11px; padding: 3px 9px; }

/* SFTP feature list */
.feat-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}
.feat-list li {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
  padding-left: 16px;
  position: relative;
}
.feat-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--blue);
  font-size: 8px;
}
.feat-list b {
  color: var(--text);
  font-weight: 650;
  margin-right: 5px;
}

/* compact approval (security pillar) — keeps all info, fits viewport */
.approval-compact {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ac-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.18);
}
.ac-no {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}
.ac-row b {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 2px;
}
.ac-row span {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.55;
}

/* compact security badges */
.sec-mini {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sec-mini-badge {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  background: rgba(0, 0, 0, 0.18);
}
.sec-mini-badge svg {
  color: var(--blue);
  flex: none;
  margin-top: 1px;
}
.sec-mini-badge strong {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  margin-bottom: 2px;
}
.sec-mini-badge span {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.5;
}

/* reuse viz blocks inside accordion body */
.thesis-right .agent-flow { margin-top: 2px; flex-wrap: wrap; gap: 0; }
.thesis-right .flow-node { font-size: 11.5px; padding: 7px 13px; }
.thesis-right .flow-link { width: 26px; }
.thesis-right .termops { margin-top: 2px; }
.thesis-right .termops .termop-row {
  grid-template-columns: 170px 1fr;
  padding: 12px 0;
}
.thesis-right .termop-desc { font-size: 13px; }
.thesis-right .termop-desc small { font-size: 11.5px; }
.thesis-right .sftp-demo { margin-top: 2px; }
.thesis-right .risk-bar { margin-top: 10px; }
.thesis-right .verdict-row { margin-top: 10px; }

/* no-JS fallback: all unfolded */
html:not(.js) .thesis-pin { height: auto !important; }
html:not(.js) .thesis-pin-inner { position: static; height: auto; padding: 40px 0; }
html:not(.js) .thesis-right { display: block; max-height: none; overflow: visible; }
html:not(.js) .pillar-body { max-height: none; opacity: 1; }
html:not(.js) .pillar-chev { display: none; }

/* reduced-motion: disable pin, unfold all */
@media (prefers-reduced-motion: reduce) {
  .thesis-pin { height: auto !important; }
  .thesis-pin-inner { position: static; height: auto; padding: 40px 0; }
  .thesis-right { display: block; max-height: none; overflow: visible; }
  .pillar-body { max-height: none; opacity: 1; transition: none; }
  .pillar-chev { display: none; }
  .thesis-left { margin-bottom: 36px; }
}

/* responsive — disable pin on mobile, unfold all */
@media (max-width: 880px) {
  .thesis-pin { height: auto !important; }
  .thesis-pin-inner { position: static; height: auto; padding: 24px 0; }
  .thesis-stage {
    grid-template-columns: 1fr;
    gap: 36px;
    width: min(100% - 48px, 720px);
  }
  .thesis-right { display: block; max-height: none; overflow: visible; }
  .pillar-body { max-height: none; opacity: 1; }
  .pillar-chev { display: none; }
  .thesis-title { font-size: clamp(40px, 13vw, 60px); }
  .thesis-progress {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 18px;
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 20px;
  }
  .thesis-progress::before { display: none; }
  .tp-dot { padding: 6px 0; }
  .tp-dot.is-active { transform: none; }
  .pillar-subgrid { grid-template-columns: 1fr; }
  .feat-list { grid-template-columns: 1fr; }
  .sec-mini { grid-template-columns: 1fr; }
  .thesis-right .termops .termop-row { grid-template-columns: 130px 1fr; }
}

/* short viewports — disable pin so content isn't clipped */
@media (max-height: 760px) and (min-width: 881px) {
  .thesis-pin { height: auto !important; }
  .thesis-pin-inner { position: static; height: auto; padding: 32px 0; }
  .thesis-right { display: block; max-height: none; overflow: visible; }
  .pillar-body { max-height: none; opacity: 1; }
  .pillar-chev { display: none; }
}

/* ============================================================
   SECURITY
   ============================================================ */
.approval {
  max-width: 760px;
  margin: 0 auto;
}
.approval-layer {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
  padding: 26px 28px;
  transition: border-color 0.4s;
}
.approval-layer:hover {
  border-color: var(--border-strong);
}
.approval-no {
  grid-row: span 2;
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-3);
  line-height: 1.15;
}
.approval-body h3 {
  font-size: 17.5px;
  font-weight: 650;
  margin-bottom: 6px;
}
.approval-body p {
  font-size: 13.5px;
  color: var(--text-2);
}
.approval-viz {
  grid-column: 2;
  margin-top: 16px;
}
.approval-arrow {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}
.approval-arrow span {
  width: 1px;
  height: 30px;
  background: linear-gradient(var(--border-strong), transparent);
  position: relative;
  overflow: hidden;
}
.approval-arrow span::after {
  content: '';
  position: absolute;
  left: 0;
  top: -10px;
  width: 1px;
  height: 10px;
  background: var(--blue);
  animation: arrow-drop 1.6s var(--ease-out) infinite;
}
@keyframes arrow-drop {
  to { transform: translateY(44px); }
}

.risk-bar {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.risk-seg {
  flex: 1;
  text-align: center;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  padding: 7px 2px;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.risk-seg.r1 { background: rgba(74, 222, 128, 0.14); color: var(--green); }
.risk-seg.r2 { background: rgba(163, 230, 53, 0.1); color: #a3e635; }
.risk-seg.r3 { background: rgba(251, 191, 36, 0.1); color: var(--amber); }
.risk-seg.r4 { background: rgba(251, 146, 60, 0.12); color: var(--orange); }
.risk-seg.r5 { background: rgba(248, 113, 113, 0.14); color: var(--red); }

.verdict-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.verdict {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid;
}
.v-pass { color: var(--green); border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.07); }
.v-human { color: var(--amber); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.07); }
.v-block { color: var(--red); border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.07); }

.approve-dialog {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.ad-cmd {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--red);
}
.ad-actions {
  display: flex;
  gap: 8px;
}
.ad-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 7px;
}
.ad-allow { background: var(--green); color: #09090b; }
.ad-deny { border: 1px solid var(--border-strong); color: var(--text-2); }

.sec-extra {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 760px;
  margin-inline: auto;
}
.sec-badge {
  display: flex;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  transition: border-color 0.4s;
}
.sec-badge:hover {
  border-color: var(--border-strong);
}
.sec-badge svg {
  color: var(--blue);
  flex: none;
  margin-top: 2px;
}
.sec-badge h4 {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 6px;
}
.sec-badge p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}

/* ============================================================
   TERMINAL OPS
   ============================================================ */
.terminal-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 72px;
  align-items: center;
}
.termops {
  display: flex;
  flex-direction: column;
}
.termop-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, padding-left 0.3s var(--ease-out);
}
.termop-row:hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent);
  padding-left: 10px;
}
.termop-row:first-child {
  border-top: 1px solid var(--border);
}
.termop-keys {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-3);
}
kbd {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2.5px;
  border-radius: 7px;
  padding: 4px 10px;
  white-space: nowrap;
}
.select-hint {
  font-size: 11.5px;
}
.termop-desc {
  font-size: 14.5px;
  font-weight: 550;
}
.termop-desc small {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-3);
  margin-top: 3px;
}

/* ============================================================
   COMPARE
   ============================================================ */
.compare {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
}
.compare-head {
  display: grid;
  grid-template-columns: 170px 1fr 1fr;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.compare-head span {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.compare-col-old {
  grid-column: 2;
  color: var(--text-3);
}
.compare-col-new {
  grid-column: 3;
  color: var(--blue);
  background: linear-gradient(180deg, rgba(148, 195, 217, 0.07), rgba(148, 195, 217, 0.02));
  border-left: 1px solid rgba(148, 195, 217, 0.16);
}
.compare-row {
  display: grid;
  grid-template-columns: 170px 1fr 1fr;
  transition: background 0.35s;
}
.compare-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
.compare-row:hover {
  background: rgba(255, 255, 255, 0.015);
}
.compare-scene {
  padding: 24px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text);
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
}
.compare-old,
.compare-new {
  padding: 24px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.7;
}
.compare-old {
  color: var(--text-3);
}
.compare-new {
  color: var(--text-2);
  background: linear-gradient(180deg, rgba(148, 195, 217, 0.05), rgba(148, 195, 217, 0.015));
  border-left: 1px solid rgba(148, 195, 217, 0.16);
}
.compare-new p {
  color: var(--text);
}
.compare-mark {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}
.compare-old .compare-mark {
  color: var(--text-3);
  border: 1px solid var(--border);
}
.compare-new .compare-mark {
  color: #09090b;
  background: var(--green);
}
.compare-old p {
  text-decoration: line-through;
  text-decoration-color: rgba(161, 161, 170, 0.35);
  text-decoration-thickness: 1px;
}

/* ============================================================
   DOWNLOAD
   ============================================================ */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  gap: 22px;
}
.dl-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
  padding: 34px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
  overflow: hidden;
}
.dl-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(148, 195, 217, 0.06), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.dl-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.dl-card:hover::before {
  opacity: 1;
}
.dl-os {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
}
.dl-os svg {
  color: var(--text);
}
.dl-os h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dl-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  padding: 3px 8px;
  border-radius: 5px;
}
.dl-ver {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.dl-feats {
  margin: 24px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
  position: relative;
}
.dl-feats li {
  position: relative;
  padding-left: 24px;
  font-size: 13.5px;
  color: var(--text-2);
}
.dl-feats li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}
.dl-note {
  text-align: center;
  margin-top: 34px;
  font-size: 13px;
  color: var(--text-3);
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.final-cta {
  padding: 160px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -320px;
  transform: translateX(-50%);
  width: 900px;
  height: 480px;
  background: radial-gradient(ellipse, rgba(148, 195, 217, 0.09), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}
.final-cta h2 {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin-bottom: 44px;
}
.final-cta em {
  font-style: normal;
  background: linear-gradient(120deg, #fafafa 20%, #94c3d9 50%, #fafafa 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 72px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 64px;
}
.footer-brand {
  display: flex;
  gap: 14px;
}
.footer-brand img {
  border-radius: 8px;
  flex: none;
}
.footer-brand strong {
  font-size: 15.5px;
  font-weight: 650;
}
.footer-brand p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.7;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col h5 {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--text-2);
  padding: 5px 0;
  transition: color 0.25s;
}
.footer-col a:hover {
  color: var(--text);
}
.footer-bottom {
  margin-top: 64px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-3);
}
.footer-made {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .fc-2 { right: -30px; }
  .fc-3 { left: -28px; }
  .fc-5 { right: 0; }
}

@media (max-width: 980px) {
  .section { padding: 100px 0; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card, .bento-lg { grid-column: span 2; grid-row: auto; }
  .bento-lg { min-height: 0; }
  .terminal-layout { grid-template-columns: 1fr; gap: 48px; }
  .footer-inner { grid-template-columns: 1fr; gap: 44px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .stat:nth-child(2)::after { display: none; }
  .fc-2, .fc-3 { display: none; }
  /* compare 堆叠 */
  .compare-head { grid-template-columns: 1fr 1fr; }
  .compare-col-old { grid-column: 1; }
  .compare-col-new { grid-column: 2; }
  .compare-row { grid-template-columns: 1fr 1fr; }
  .compare-scene {
    grid-column: 1 / -1;
    border-right: none;
    border-bottom: 1px dashed var(--border);
    padding: 16px 20px 12px;
  }
  .compare-old, .compare-new { padding: 18px 20px 22px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-github span { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 40px); }
  .hero-meta { flex-wrap: wrap; gap: 10px; }
  .term-body { font-size: 11.5px; min-height: 300px; padding: 16px 14px 18px; }
  .term-floats { display: none; }
  .sec-extra { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-card { padding: 26px; }
  .termop-row { grid-template-columns: 1fr; gap: 10px; }
  .approval-layer { grid-template-columns: 1fr; padding: 22px; }
  .approval-no { grid-row: auto; }
  .approval-viz { grid-column: 1; }
  .risk-seg { font-size: 0; padding: 9px 2px; }
  .risk-seg::first-letter { font-size: 10.5px; }
  .scroll-hint { display: none; }
  .br-desktop { display: none; }
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr; }
  .compare-old::before,
  .compare-new::before {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
  }
  .compare-old::before { content: '传统 SSH 终端'; color: var(--text-3); }
  .compare-new::before { content: 'MARCEL SSH'; color: var(--blue); }
  .compare-old, .compare-new { flex-direction: column; gap: 4px; }
  .compare-new { border-left: none; border-top: 1px dashed var(--border); }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .hero-title .line > span { transform: none; }
  .cursor-glow, .scroll-hint, .hero-beam { display: none; }
  .term-window { transform: none; }
}
