:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-ink: #0b0b0f;
  --bg-ink-2: #14141b;
  --ink: #0b0b0f;
  --ink-2: #3d3d47;
  --muted: #6e6e7a;
  --muted-2: #9a9aa5;
  --line: rgba(11, 11, 15, 0.08);
  --line-strong: rgba(11, 11, 15, 0.14);
  --line-dark: rgba(255, 255, 255, 0.1);
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.09);
  --accent-ink: #8f88f2;
  --accent-ink-soft: rgba(129, 140, 248, 0.14);
  --shadow-sm: 0 1px 2px rgba(11, 11, 15, 0.04), 0 4px 16px rgba(11, 11, 15, 0.05);
  --shadow-md: 0 6px 24px rgba(11, 11, 15, 0.08);
  --shadow-lg: 0 20px 60px rgba(11, 11, 15, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --container: 1180px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 32px; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Eyebrow / headings ---------- */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section { padding: 120px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-ink); color: #fff; }

.section-head { max-width: 720px; margin-bottom: 64px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.section-dark .eyebrow { color: var(--accent-ink); }
.section-dark h2 { color: #fff; }

.lead {
  font-size: 1.14rem;
  color: var(--muted);
  margin-top: 20px;
  max-width: 620px;
  line-height: 1.75;
}
.section-dark .lead { color: rgba(255, 255, 255, 0.62); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  white-space: nowrap;
}
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.28);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(79, 70, 229, 0.34); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(11, 11, 15, 0.03); transform: translateY(-1px); }
.section-dark .btn-ghost { color: #fff; border-color: var(--line-dark); }
.section-dark .btn-ghost:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.05); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-mark {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
  position: relative;
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--ink-2); transition: color 0.25s var(--ease); position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); border-radius: 2px; transition: width 0.3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.3s var(--ease); }
.nav-mobile { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 176px 0 120px;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(79, 70, 229, 0.08), transparent 60%),
    var(--bg);
}
.hero-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.10), transparent 60%);
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite;
}
@keyframes floatGlow {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(24px); }
}
.hero .container { position: relative; text-align: center; }
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hero-accent {
  background: linear-gradient(120deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  max-width: 680px;
  margin: 28px auto 0;
  font-size: 1.18rem;
  color: var(--muted);
  line-height: 1.8;
}
.hero-actions { margin-top: 40px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  margin-top: 72px;
  display: flex;
  justify-content: center;
  gap: 0;
  border-top: 1px solid var(--line);
}
.hero-stat { padding: 28px 48px; text-align: center; }
.hero-stat + .hero-stat { border-left: 1px solid var(--line); }
.hero-stat-num {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--ink), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.hero-stat-label { font-size: 0.86rem; color: var(--muted); }

/* ---------- Chain ---------- */
.chain { margin: 8px 0 40px; }
.chain-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 0;
  counter-reset: none;
}
.chain-item {
  position: relative;
  padding: 18px 8px;
  text-align: center;
  border-top: 2px solid var(--line);
}
.chain-item::before {
  content: "";
  position: absolute;
  top: -7px; left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-strong);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.chain-item:nth-child(n)::before { box-shadow: 0 0 0 4px var(--bg); }
.chain-item:hover::before { background: var(--accent); border-color: var(--accent); }
.chain-idx {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted-2);
  margin-bottom: 8px;
}
.chain-txt { display: block; font-size: 0.82rem; font-weight: 500; color: var(--ink-2); line-height: 1.4; }

.mantra {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  margin-bottom: 64px;
}
.mantra-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(79, 70, 229, 0.1);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.mantra-txt { font-weight: 500; color: var(--ink-2); font-size: 0.98rem; }

/* ---------- Stages ---------- */
.stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}
.stage {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.stage:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.stage-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.stage h3 { font-size: 1.28rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.stage p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Quote ---------- */
.quote {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 28px;
  max-width: 760px;
}
.quote p { font-size: 1.35rem; font-weight: 600; line-height: 1.55; letter-spacing: -0.01em; color: var(--ink); }
.quote cite { display: block; margin-top: 12px; font-style: normal; font-size: 0.92rem; color: var(--muted); }
.section-dark .quote p, .section-dark .quote { color: #fff; }

/* ---------- Dark section (org-ai) ---------- */
.section-dark { background: radial-gradient(1000px 500px at 80% -10%, rgba(129, 140, 248, 0.10), transparent 55%), var(--bg-ink); }

.transforms { display: grid; gap: 0; margin-bottom: 64px; }
.transform {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line-dark);
}
.transform:last-child { border-bottom: 1px solid var(--line-dark); }
.transform-num { font-size: 0.95rem; font-weight: 700; color: var(--accent-ink); letter-spacing: 0.06em; padding-top: 4px; }
.transform h3 { font-size: 1.18rem; font-weight: 600; color: #fff; letter-spacing: -0.01em; margin-bottom: 8px; }
.transform p { color: rgba(255, 255, 255, 0.58); font-size: 0.96rem; max-width: 640px; }

.carriers { margin-bottom: 64px; }
.carriers-title { font-size: 0.92rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); margin-bottom: 22px; }
.carrier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.carrier {
  background: var(--bg-ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.carrier:hover { transform: translateY(-4px); border-color: rgba(129, 140, 248, 0.4); }
.carrier-ic {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--accent-ink-soft);
  color: var(--accent-ink);
  font-weight: 700;
  margin-bottom: 18px;
}
.carrier h4 { font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: 10px; }
.carrier p { color: rgba(255, 255, 255, 0.58); font-size: 0.93rem; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.principle {
  padding: 26px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg, rgba(129, 140, 248, 0.08), transparent);
}
.principle p { font-size: 1.06rem; font-weight: 600; line-height: 1.6; color: #fff; }

/* ---------- Loop ---------- */
.loop { display: flex; justify-content: center; margin-bottom: 72px; }
.loop-ring {
  position: relative;
  width: 460px; height: 460px;
  flex-shrink: 0;
}
.loop-ring::before {
  content: "";
  position: absolute;
  inset: 80px;
  border-radius: 50%;
  border: 1.5px dashed var(--line-strong);
}
.loop-center {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  width: 132px; height: 132px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.loop-center span { font-size: 0.8rem; color: var(--muted); }
.loop-center strong { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.02em; }
.loop-node {
  position: absolute;
  width: 168px;
  text-align: center;
}
.loop-node h4 { font-size: 1.05rem; font-weight: 700; margin: 10px 0 6px; }
.loop-node p { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.loop-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.15rem;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.loop-node:hover .loop-ic { background: var(--accent); color: #fff; transform: scale(1.08); }
.loop-node-1 { top: -20px; left: 50%; transform: translateX(-50%); }
.loop-node-2 { top: 50%; right: -46px; transform: translateY(-50%); }
.loop-node-3 { bottom: -20px; left: 50%; transform: translateX(-50%); }
.loop-node-4 { top: 50%; left: -46px; transform: translateY(-50%); }

.loop-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.loop-col {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
}
.loop-col h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 22px; }
.metric-list { list-style: none; display: grid; gap: 0; }
.metric-list li {
  display: flex; align-items: baseline; gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
  color: var(--ink-2);
}
.metric-list li:last-child { border-bottom: none; }
.metric-list li span { font-size: 0.8rem; font-weight: 700; color: var(--accent); min-width: 26px; }
.col-note { margin-top: 18px; font-size: 0.9rem; color: var(--muted); }

/* ---------- Case timeline ---------- */
.timeline { position: relative; margin: 0 0 72px; padding-left: 8px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 23px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--line));
}
.t-step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 24px; padding: 0 0 44px; }
.t-step:last-child { padding-bottom: 0; }
.t-marker {
  position: relative; z-index: 1;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.t-body h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.t-body p { color: var(--muted); font-size: 0.97rem; max-width: 760px; }
.t-warn {
  margin-top: 12px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--ink-2) !important;
}
.t-token {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: 16px;
  padding: 12px 20px;
  background: var(--bg-ink);
  border-radius: var(--radius-xs);
}
.t-token span { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.08em; text-transform: uppercase; }
.t-token b { color: #fff; font-size: 1.1rem; font-weight: 700; letter-spacing: 0.01em; }

.case-eval { margin-bottom: 64px; }
.case-eval > h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 22px; }
.eval-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.eval-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 28px; }
.eval-card h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.eval-card p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Scenario library ---------- */
.sc-search { margin-bottom: 40px; display: flex; flex-direction: column; gap: 18px; }
.sc-search-box {
  position: relative;
  display: flex; align-items: center;
  max-width: 560px;
}
.sc-search-ic {
  position: absolute; left: 18px;
  width: 16px; height: 16px;
  border: 2px solid var(--muted-2);
  border-radius: 50%;
}
.sc-search-ic::after {
  content: "";
  position: absolute;
  right: -6px; bottom: -4px;
  width: 7px; height: 2px;
  background: var(--muted-2);
  transform: rotate(45deg);
  border-radius: 2px;
}
.sc-search-box input {
  width: 100%;
  padding: 14px 44px 14px 48px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.sc-search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sc-clear {
  position: absolute; right: 14px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-size: 1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.sc-clear:hover { background: var(--line-strong); color: var(--ink); }

.sc-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.25s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.sc-industry { display: flex; }
.sc-select select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 40px 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e7a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  outline: none;
}
.sc-select select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sc-count { font-size: 0.9rem; color: var(--muted); align-self: center; }

.sc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sc-card {
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.sc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.sc-card-tags { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.sc-tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.sc-tag.type { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.sc-card h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.45; letter-spacing: -0.01em; margin-bottom: 10px; }
.sc-card-overview {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
}
.sc-card-link {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.88rem; font-weight: 600;
  color: var(--accent);
}
.sc-card-link:hover { color: var(--accent-strong); }
.sc-empty { text-align: center; padding: 60px 0; color: var(--muted); }

/* ---------- Contact / CTA ---------- */
.contact-inner { display: flex; justify-content: center; }
.contact-card { text-align: center; max-width: 720px; padding: 40px 0; }
.contact-card h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; line-height: 1.22; letter-spacing: -0.02em; }
.contact-card .lead { margin-left: auto; margin-right: auto; }
.contact-card .hero-actions { margin-top: 36px; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-ink); color: #fff; border-top: 1px solid var(--line-dark); }
.footer-inner { padding: 56px 32px; display: flex; flex-direction: column; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.footer-note { color: rgba(255, 255, 255, 0.55); font-size: 0.92rem; }
.footer-copy { color: rgba(255, 255, 255, 0.38); font-size: 0.84rem; }

/* ---------- AI Assistant ---------- */
.assistant-fab {
  position: fixed;
  right: 28px; bottom: 28px;
  z-index: 200;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.assistant-fab:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(79, 70, 229, 0.5); }
.assistant-fab.is-open { transform: scale(0); }
.fab-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  animation: fabPulse 2.6s ease-out infinite;
}
@keyframes fabPulse {
  0% { transform: scale(1); opacity: 0.8; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}
.fab-core { position: relative; width: 26px; height: 26px; }
.fab-core::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #fff;
}
.fab-core::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -2px;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 0 0 2px 2px;
}

.assistant-panel {
  position: fixed;
  right: 28px; bottom: 100px;
  z-index: 210;
  width: 384px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 140px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.assistant-panel.is-open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.assistant-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.assistant-head-id { display: flex; align-items: center; gap: 12px; }
.assistant-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  position: relative;
}
.assistant-avatar::after {
  content: "";
  position: absolute; right: -1px; bottom: -1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--bg);
}
.assistant-head-id strong { display: block; font-size: 0.95rem; font-weight: 700; }
.assistant-status { font-size: 0.76rem; color: var(--muted); }
.assistant-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 1.3rem; line-height: 1;
  color: var(--muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.assistant-close:hover { background: var(--bg-soft); color: var(--ink); }

.assistant-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-soft);
}
.msg { max-width: 84%; padding: 12px 16px; border-radius: 16px; font-size: 0.92rem; line-height: 1.65; }
.msg-bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--ink-2); }
.msg-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg p { margin: 0 0 8px; }
.msg p:last-child { margin-bottom: 0; }
.msg ul, .msg ol { margin: 8px 0; padding-left: 20px; }
.msg li { margin: 4px 0; }
.msg code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.84em; background: var(--bg-soft); padding: 1px 6px; border-radius: 5px; }
.msg-bot code { background: var(--bg-soft); }
.msg pre { background: var(--bg-ink); color: #e5e7eb; padding: 12px 14px; border-radius: 10px; overflow-x: auto; margin: 10px 0; }
.msg pre code { background: none; padding: 0; color: inherit; }
.msg a { color: var(--accent); text-decoration: underline; }
.msg strong { font-weight: 700; }
.msg h1, .msg h2, .msg h3, .msg h4 { margin: 10px 0 6px; line-height: 1.4; }
.msg h1 { font-size: 1.15rem; } .msg h2 { font-size: 1.08rem; } .msg h3 { font-size: 1rem; } .msg h4 { font-size: 0.95rem; }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 6px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); animation: typingBounce 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

.assistant-input {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.assistant-input textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 0.92rem;
  line-height: 1.5;
  max-height: 120px;
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.assistant-input textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.assistant-input button {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease), opacity 0.25s var(--ease);
}
.assistant-input button:hover { background: var(--accent-strong); }
.assistant-input button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .chain-list { grid-template-columns: repeat(6, 1fr); row-gap: 28px; }
  .carrier-grid, .principles, .stages, .eval-grid { grid-template-columns: 1fr; }
  .sc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 32px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav-mobile.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-mobile a { padding: 12px 0; font-weight: 500; color: var(--ink-2); border-bottom: 1px solid var(--line); }
  .nav-mobile a.btn { margin-top: 12px; justify-content: center; color: #fff; }

  .loop { transform: scale(0.78); margin-bottom: 24px; }
  .loop-cols { grid-template-columns: 1fr; }
  .loop-node { width: 150px; }
  .hero-stat { padding: 22px 28px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 84px 0; }
  .chain-list { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 140px 0 84px; }
  .hero-stats { flex-direction: column; }
  .hero-stat + .hero-stat { border-left: none; border-top: 1px solid var(--line); }
  .sc-grid { grid-template-columns: 1fr; }
  .transform { grid-template-columns: 44px 1fr; gap: 14px; }
  .loop { transform: scale(0.6); margin-bottom: 0; }
  .loop-node { width: 170px; }
  .quote p { font-size: 1.12rem; }
  .mantra { gap: 10px; }
  .mantra-txt { font-size: 0.9rem; }
  .assistant-panel { right: 16px; bottom: 92px; }
  .assistant-fab { right: 16px; bottom: 18px; }
  .stages, .eval-grid { grid-template-columns: 1fr; }
}
