/* ===========================================================
   AI Omic — 3D Automation Website
   Display: Space Grotesk · Body: Hanken Grotesk · CJK: Noto Sans SC
   =========================================================== */

:root {
  --max: 1200px;
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 26px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Hanken Grotesk", "Noto Sans SC", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Space Grotesk", ui-monospace, "SFMono-Regular", monospace;

  /* accent pair — overridable by Tweaks */
  --a1: #19c9b3;          /* teal  */
  --a2: #3b86ff;          /* blue  */
  --accent: linear-gradient(135deg, var(--a1), var(--a2));
}

/* ---------- DARK (default) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-0: #060d20;
  --bg-1: #0a1730;
  --bg-grad: radial-gradient(1200px 760px at 78% -8%, rgba(59,134,255,.20), transparent 60%),
             radial-gradient(1000px 700px at 8% 8%, rgba(25,201,179,.16), transparent 58%),
             linear-gradient(180deg, #060d20, #081127 60%, #060c1d);
  --ink: #eaf1ff;
  --muted: #9bb0d2;
  --faint: #6c7fa1;
  --surface: rgba(255,255,255,.045);
  --surface-2: rgba(255,255,255,.07);
  --surface-solid: #0e1c39;
  --border: rgba(255,255,255,.10);
  --border-2: rgba(255,255,255,.16);
  --glass-hi: rgba(255,255,255,.10);
  --shadow: 0 30px 70px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.35);
  --shadow-card: 0 24px 60px rgba(2,8,23,.55);
  --glow: 0 0 0 1px rgba(59,134,255,.16), 0 20px 60px rgba(25,201,179,.18);
}

/* ---------- LIGHT ---------- */
html[data-theme="light"] {
  color-scheme: light;
  --bg-0: #eef5fb;
  --bg-1: #ffffff;
  --bg-grad: radial-gradient(1100px 720px at 80% -10%, rgba(42,117,232,.12), transparent 60%),
             radial-gradient(900px 640px at 4% 4%, rgba(8,127,115,.12), transparent 58%),
             linear-gradient(180deg, #eef5fb, #f5fafe 60%, #eaf3fb);
  --ink: #0a1430;
  --muted: #51637f;
  --faint: #8595ad;
  --surface: rgba(255,255,255,.78);
  --surface-2: #ffffff;
  --surface-solid: #ffffff;
  --border: rgba(11,30,70,.10);
  --border-2: rgba(11,30,70,.16);
  --glass-hi: rgba(255,255,255,.9);
  --shadow: 0 30px 70px rgba(13,52,96,.16), 0 8px 24px rgba(13,52,96,.08);
  --shadow-card: 0 24px 56px rgba(13,52,96,.14);
  --glow: 0 0 0 1px rgba(42,117,232,.14), 0 20px 56px rgba(8,127,115,.16);
}
html[data-theme="light"] { --a1: #0bb39c; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* fixed background layer with aurora + canvas network */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-grad);
}
#net-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: .9;
  pointer-events: none;
}
html[data-theme="light"] #net-canvas { opacity: .55; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--a2); outline-offset: 3px; border-radius: 6px; }

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.lang-zh h1, .lang-zh h2, .lang-zh h3 { letter-spacing: 0; }

/* gradient ink for emphasis */
.grad {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--a1);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: linear-gradient(90deg, var(--a1), transparent);
}

/* ============ buttons ============ */
.btn {
  --pad: 13px 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: var(--pad);
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .96rem;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, border-color .3s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #02101f;
  box-shadow: 0 12px 30px rgba(25,201,179,.28), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(59,134,255,.4), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--ink);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--a1); background: var(--surface-2); }
.btn-sm { min-height: 42px; padding: 9px 18px; font-size: .9rem; }

.wa {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; min-height: 42px;
  border-radius: 999px;
  background: rgba(37,211,102,.12);
  border: 1px solid rgba(37,211,102,.32);
  color: #25d366;
  font-weight: 650; font-size: .88rem;
  transition: transform .3s var(--ease), background .3s;
}
html[data-theme="light"] .wa { color: #0b8a43; }
.wa:hover { transform: translateY(-2px); background: rgba(37,211,102,.2); }
.wa svg { width: 19px; height: 19px; }

/* ============ header ============ */
.header {
  position: sticky; top: 0; z-index: 60;
  transition: background .3s, border-color .3s, box-shadow .3s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: color-mix(in srgb, var(--bg-0) 72%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 15px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px; object-fit: contain;
  box-shadow: var(--glow);
}
.brand-txt strong { font-family: var(--font-display); font-size: 1.04rem; display: block; letter-spacing: -.01em; white-space: nowrap; }
.brand-txt small { color: var(--muted); font-size: .74rem; letter-spacing: .02em; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--muted); font-size: .93rem; font-weight: 550; position: relative; transition: color .25s; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); border-radius: 2px; transition: width .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  min-height: 42px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-2);
  font-family: var(--font-display); font-weight: 600; font-size: .86rem; cursor: pointer;
  transition: transform .25s, border-color .25s;
}
.lang-toggle:hover { transform: translateY(-2px); border-color: var(--a1); }

/* ============ hero ============ */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 40px;
  align-items: center;
  padding: 64px 0 88px;
}
.hero-copy { max-width: 620px; }
.h1 {
  font-size: clamp(2.7rem, 6vw, 4.7rem);
  line-height: 1.02;
  margin: 0 0 22px;
}
.hero-lede {
  color: var(--muted);
  font-size: clamp(1.04rem, 1.5vw, 1.18rem);
  max-width: 540px;
  margin: 0 0 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.hero-trust { display: flex; flex-wrap: wrap; gap: 22px 34px; align-items: center; }
.trust-stat strong {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
  display: block; line-height: 1;
}
.trust-stat span { color: var(--muted); font-size: .82rem; }
.trust-divider { width: 1px; height: 34px; background: var(--border-2); }

/* ---- 3D stage ---- */
.stage {
  position: relative;
  height: 520px;
  perspective: 1300px;
  perspective-origin: 50% 45%;
}
.stage-3d {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
  display: grid; place-items: center;
}
.floor-glow {
  position: absolute; left: 50%; bottom: 64px;
  width: 320px; height: 90px;
  translate: -50% 0;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--a1) 55%, transparent), transparent 70%);
  filter: blur(22px);
  transform: translateZ(-120px) rotateX(72deg);
  opacity: .8;
}

/* floating glass task cards */
.float-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 11px 13px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
  animation: floaty var(--dur, 7s) var(--ease) infinite;
}
.float-card .fc-ico {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
}
.float-card .fc-ico svg { width: 17px; height: 17px; }
.float-card b { font-family: var(--font-display); font-size: .85rem; font-weight: 600; display: block; }
.float-card small { color: var(--muted); font-size: .72rem; }
.float-card .pill { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; font-family: var(--font-mono); }
.pill-ok { background: rgba(25,201,179,.16); color: var(--a1); }

.fc-1 { top: 14px; left: 8px; transform: translateZ(56px); --dur: 6.5s; }
.fc-2 { top: 30px; right: 8px; transform: translateZ(56px); --dur: 7.8s; animation-delay: -2s; }
.fc-3 { bottom: 84px; left: 12px; transform: translateZ(40px); --dur: 8.4s; animation-delay: -4s; }
.fc-4 { bottom: 16px; right: 14px; transform: translateZ(70px); --dur: 7s; animation-delay: -1s; }

@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -16px; }
}

/* connecting dotted flow line behind cards */
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: translateZ(20px); pointer-events: none; }
.flow-svg path { fill: none; stroke: var(--a2); stroke-width: 2; stroke-dasharray: 4 9; opacity: .5;
  animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -26; } }

/* ===== Xiao-O 3D mascot ===== */
.bot {
  position: relative;
  width: 184px; height: 226px;
  transform-style: preserve-3d;
  transform: translateZ(0);
  animation: botFloat 6.4s var(--ease) infinite;
}
@keyframes botFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.bot-halo {
  position: absolute; inset: 8px -18px 0;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--a1) 34%, transparent), transparent 54%),
    radial-gradient(circle at 50% 66%, color-mix(in srgb, var(--a2) 22%, transparent), transparent 62%);
  filter: blur(24px); transform: translateZ(-40px);
  opacity: .9;
}
.bot-head {
  position: absolute; top: 18px; left: 50%; translate: -50% 0;
  width: 148px; height: 112px;
  border-radius: 42px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--surface-2) 70%, #fff 8%), var(--surface));
  border: 2px solid var(--border-2);
  box-shadow: var(--shadow-card), inset 0 2px 0 var(--glass-hi), 0 0 26px color-mix(in srgb, var(--a2) 18%, transparent);
  backdrop-filter: blur(8px);
  transform: translateZ(50px);
  overflow: hidden;
}
html[data-theme="dark"] .bot-head { background: linear-gradient(160deg, #16294d, #0c1a36); }
html[data-theme="light"] .bot-head { background: linear-gradient(160deg, #ffffff, #eef5fc); }

.visor {
  position: absolute; top: 29px; left: 50%; translate: -50% 0;
  width: 104px; height: 50px; border-radius: 999px;
  background: radial-gradient(circle at 50% 30%, #0b1f3e, #050d1f 75%);
  border: 1.5px solid color-mix(in srgb, var(--a2) 50%, transparent);
  box-shadow: inset 0 0 20px rgba(59,134,255,.36), 0 0 20px rgba(25,201,179,.2);
  display: flex; align-items: center; justify-content: center; gap: 18px;
  overflow: hidden;
}
.eye {
  width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #d8fff8, var(--a1) 60%, var(--a2));
  box-shadow: 0 0 12px var(--a1), 0 0 22px var(--a2);
  animation: softEye 3.6s ease-in-out infinite;
}
@keyframes softEye { 0%,100% { transform: scale(1); opacity: .88; } 50% { transform: scale(1.08); opacity: 1; } }
.visor-scan { display: none; }

.antenna {
  display: none;
  position: absolute; top: -22px; left: 50%; translate: -50% 0;
  width: 4px; height: 26px; border-radius: 4px;
  background: linear-gradient(var(--a1), var(--a2));
  transform: translateZ(58px);
}
.antenna::after {
  content: ""; position: absolute; top: -10px; left: 50%; translate: -50% 0;
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #eaffff, var(--a1));
  box-shadow: 0 0 16px var(--a1), 0 0 30px var(--a2);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: translateX(-50%) scale(.9); opacity: .82; } 50% { transform: translateX(-50%) scale(1.12); opacity: 1; } }

.ear { display: none; position: absolute; top: 52px; width: 9px; height: 30px; border-radius: 6px;
  background: linear-gradient(var(--a1), var(--a2)); transform: translateZ(40px); opacity: .9; }
.ear-l { left: 16px; } .ear-r { right: 16px; }

.bot-body {
  position: absolute; bottom: 38px; left: 50%; translate: -50% 0;
  width: 96px; height: 72px; border-radius: 30px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--a2) 36%, var(--surface-solid)), var(--surface-solid));
  border: 2px solid var(--border-2);
  box-shadow: var(--shadow-card), inset 0 2px 0 var(--glass-hi);
  transform: translateZ(20px);
}
.bot-core {
  position: absolute; top: 18px; left: 50%; translate: -50% 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #eafffb, var(--a1) 55%, var(--a2));
  box-shadow: 0 0 20px var(--a1), inset 0 0 10px rgba(255,255,255,.6);
  animation: pulse 3s ease-in-out infinite;
}
.bot-core::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--a2) 42%, transparent);
}
.arm { display: none; position: absolute; bottom: 44px; width: 11px; height: 40px; border-radius: 8px;
  background: linear-gradient(var(--a2), var(--a1)); transform: translateZ(34px); }
.arm-l { left: 24px; rotate: 16deg; } .arm-r { right: 24px; rotate: -16deg; }
.bot-name {
  position: absolute; left: 50%; bottom: 0; translate: -50% 0;
  padding: 8px 15px;
  border: 1px solid color-mix(in srgb, var(--a1) 38%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 74%, transparent);
  color: var(--text);
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 10px 22px rgba(0,0,0,.18), inset 0 1px 0 var(--glass-hi);
  transform: translateZ(48px);
}

/* ============ marquee / tools ============ */
.tools {
  border-block: 1px solid var(--border);
  padding: 26px 0;
  position: relative;
}
.tools-head { text-align: center; color: var(--faint); font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 18px; }
.tools-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tool-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 17px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--muted);
  backdrop-filter: blur(10px);
  transition: transform .3s var(--ease), color .3s, border-color .3s;
}
.tool-chip:hover { transform: translateY(-3px); color: var(--ink); border-color: var(--a1); }
.tool-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ============ section scaffolding ============ */
.section { padding: 96px 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* ---- flow / journey pipeline ---- */
.flow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; position: relative; }
.flow-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: transform .4s var(--ease), border-color .4s;
}
.flow-step:hover { transform: translateY(-8px); border-color: var(--a1); }
.flow-num {
  font-family: var(--font-mono); font-weight: 700; font-size: .8rem;
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--a1);
}
.flow-step h3 { font-size: 1.16rem; margin-bottom: 8px; }
.flow-step p { color: var(--muted); font-size: .94rem; margin: 0; }
.flow-step .connector {
  position: absolute; top: 46px; right: -18px; width: 18px; height: 2px;
  background: linear-gradient(90deg, var(--a1), transparent); z-index: 2;
}
.flow-step:last-child .connector { display: none; }

/* ---- packages ---- */
.pkg-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  perspective: 1600px; perspective-origin: 50% 20%;
}
.pkg {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  transform: rotateX(6deg);
  transition: transform .5s var(--ease), box-shadow .5s, border-color .4s;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.pkg::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-hi) 50%, transparent);
}
.pkg:hover { transform: rotateX(0deg) translateY(-12px); border-color: var(--border-2); box-shadow: var(--shadow), var(--glow); }
.pkg-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.pkg-num { font-family: var(--font-mono); color: var(--a1); font-weight: 700; font-size: .82rem; }
.pkg-tag {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.pkg h3 { font-size: 1.32rem; margin-bottom: 14px; }
.pkg .price { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; margin-bottom: 6px; }
.pkg .support { color: var(--muted); font-size: .86rem; margin-bottom: 16px; font-weight: 600; }
.pkg .desc { color: var(--muted); font-size: .92rem; margin: 0 0 22px; flex: 1; }
.pkg .pkg-cta {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--a1);
}
.pkg .pkg-cta svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.pkg:hover .pkg-cta svg { transform: translateX(4px); }

.pkg-featured {
  background: linear-gradient(165deg, color-mix(in srgb, var(--a2) 22%, var(--surface-solid)), var(--surface-solid));
  border-color: color-mix(in srgb, var(--a2) 40%, transparent);
  transform: rotateX(6deg) translateY(-16px) scale(1.02);
  box-shadow: var(--shadow), var(--glow);
  z-index: 2;
}
.pkg-featured:hover { transform: rotateX(0deg) translateY(-26px) scale(1.02); }
.pkg-featured .pkg-tag { background: var(--accent); color: #02101f; border-color: transparent; }
.pkg-featured .price, .pkg-featured h3 { color: #fff; }
html[data-theme="light"] .pkg-featured .price, html[data-theme="light"] .pkg-featured h3 { color: var(--ink); }
.pkg-glint {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--mx,50%) var(--my,0%), rgba(255,255,255,.14), transparent 55%);
  opacity: 0; transition: opacity .3s;
}
.pkg:hover .pkg-glint { opacity: 1; }

/* ---- results ---- */
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.result {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 20px;
  transition: transform .4s var(--ease), border-color .4s;
}
.result:hover { transform: translateY(-8px); border-color: var(--a1); }
.result-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-av {
  width: 44px; height: 44px; border-radius: 13px; flex: 0 0 auto;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700;
  background: var(--accent); color: #02101f;
}
.result-role { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--a1); text-align: right; }
.result blockquote { margin: 0; font-size: 1rem; line-height: 1.62; color: var(--ink); flex: 1; }
.result-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.result-tags span {
  font-family: var(--font-mono); font-size: .68rem; padding: 5px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.result-featured {
  background: linear-gradient(160deg, color-mix(in srgb, var(--a2) 26%, var(--surface-solid)), var(--surface-solid));
  border-color: color-mix(in srgb, var(--a2) 36%, transparent);
}
.quote-mark { font-family: var(--font-display); font-size: 3rem; line-height: .5; color: var(--a1); opacity: .5; height: 18px; }

/* ---- split: process + scenarios ---- */
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.steps { display: grid; gap: 14px; }
.step {
  display: grid; grid-template-columns: 46px 1fr; gap: 4px 18px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; backdrop-filter: blur(10px);
  transition: transform .3s var(--ease), border-color .3s;
}
.step:hover { transform: translateX(6px); border-color: var(--a1); }
.step-num {
  grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; color: var(--a1);
  background: var(--surface-2); border: 1px solid var(--border-2);
}
.step h3 { font-size: 1.08rem; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }

.scen-grid { display: grid; gap: 16px; }
.scenarios .section-sub { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--a1); margin-bottom: 18px; }
.scen {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 26px; backdrop-filter: blur(10px); box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), border-color .35s;
}
.scen:hover { transform: translateY(-6px); border-color: var(--a1); }
.scen h3 { font-size: 1.12rem; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.scen .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); }
.scen .ic svg { width: 18px; height: 18px; }
.scen p { color: var(--muted); margin: 0; font-size: .94rem; }

/* ---- CTA ---- */
.cta {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  background: linear-gradient(150deg, #0a2a4d, #08203f 55%, #0a1730);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow);
}
html[data-theme="light"] .cta { background: linear-gradient(150deg, #0a2a4d, #0c2f55); }
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 400px at 80% 0%, rgba(59,134,255,.4), transparent 60%),
             radial-gradient(600px 360px at 10% 100%, rgba(25,201,179,.34), transparent 60%);
}
.cta > * { position: relative; }
.cta h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.cta p { color: rgba(255,255,255,.78); font-size: 1.1rem; max-width: 560px; margin: 0 auto 30px; }
.cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--border); padding: 44px 0 56px; margin-top: 60px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.footer .brand-txt small { max-width: 320px; }
.footer-meta { color: var(--faint); font-size: .84rem; max-width: 420px; }
.footer-meta a { color: var(--a1); font-weight: 600; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Xiao O assistant ---- */
.xiao-assistant {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
}

.xiao-launcher {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(115,255,238,.22), transparent 58%),
    linear-gradient(160deg, #162f54, #091932);
  box-shadow:
    0 0 0 1px rgba(116,184,255,.22),
    0 0 22px rgba(25,201,179,.2),
    0 12px 32px rgba(0,0,0,.3);
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: visible;
  padding: 0;
  animation: xiaoFloat 3.6s ease-in-out infinite;
  transition: box-shadow .25s var(--ease);
}

.xiao-launcher:hover,
.xiao-launcher:focus-visible {
  animation-play-state: paused;
  transform: scale(1.1);
  box-shadow:
    0 0 0 1px rgba(116,184,255,.4),
    0 0 32px rgba(25,201,179,.35),
    0 14px 42px rgba(0,0,0,.36);
}

/* Mini-bot icon (0.25× of hero bot) */
.xiao-mini-bot {
  position: relative;
  width: 46px;
  height: 56px;
  display: block;
  flex-shrink: 0;
}

.xiao-mini-halo {
  position: absolute;
  inset: 2px -5px 0;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--a1) 38%, transparent), transparent 54%),
    radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--a2) 24%, transparent), transparent 62%);
  filter: blur(8px);
  opacity: .9;
}

.xiao-mini-head {
  position: absolute;
  top: 5px;
  left: 50%;
  translate: -50% 0;
  width: 37px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(160deg, #16294d, #0c1a36);
  border: 1.5px solid var(--border-2);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 var(--glass-hi),
    0 0 14px color-mix(in srgb, var(--a2) 18%, transparent);
  z-index: 2;
  overflow: hidden;
}

.xiao-mini-visor {
  position: absolute;
  top: 7px;
  left: 50%;
  translate: -50% 0;
  width: 26px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 30%, #0b1f3e, #050d1f 75%);
  border: 1px solid color-mix(in srgb, var(--a2) 50%, transparent);
  box-shadow: inset 0 0 8px rgba(59,134,255,.36), 0 0 8px rgba(25,201,179,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
}

.xiao-mini-eye {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 40% 35%, #d8fff8, var(--a1) 60%, var(--a2));
  box-shadow: 0 0 6px var(--a1), 0 0 10px var(--a2);
  animation: softEye 3.6s ease-in-out infinite;
}

.xiao-mini-body {
  position: absolute;
  bottom: 10px;
  left: 50%;
  translate: -50% 0;
  width: 24px;
  height: 18px;
  border-radius: 7px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--a2) 36%, var(--surface-solid)), var(--surface-solid));
  border: 1.5px solid var(--border-2);
  box-shadow: var(--shadow-card), inset 0 1px 0 var(--glass-hi);
  z-index: 1;
}

.xiao-mini-core {
  position: absolute;
  top: 4px;
  left: 50%;
  translate: -50% 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #eafffb, var(--a1) 55%, var(--a2));
  box-shadow: 0 0 10px var(--a1), inset 0 0 4px rgba(255,255,255,.6);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes xiaoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.xiao-panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(390px, calc(100vw - 32px));
  max-height: min(650px, calc(100vh - 120px));
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 28px 80px rgba(0,0,0,.45), 0 0 50px rgba(25,201,179,.12);
}

.xiao-panel[hidden] { display: none; }

.xiao-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(25,201,179,.14), rgba(59,134,255,.12));
}

.xiao-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
}

.xiao-head span {
  color: var(--muted);
  font-size: .82rem;
}

.xiao-head-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xiao-head-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #19c9b3;
  box-shadow: 0 0 8px rgba(25,201,179,.7);
  flex-shrink: 0;
}

.xiao-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-2);
  font: inherit;
  font-size: .88rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s, color .18s;
}

.xiao-close:hover {
  background: rgba(255,255,255,.1);
  color: var(--ink);
}

.xiao-messages {
  min-height: 250px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xiao-message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.52;
  white-space: normal;
}

.xiao-message.assistant {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.xiao-message.user {
  align-self: flex-end;
  background: var(--accent);
  color: #041225;
  font-weight: 650;
}

.xiao-message a {
  color: var(--a1);
  font-weight: 800;
  word-break: break-word;
}

.xiao-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 14px;
}

.xiao-prompts button {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 8px 10px;
  font: inherit;
  font-size: .76rem;
  font-weight: 750;
  cursor: pointer;
}

.xiao-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.03);
}

.xiao-form input {
  min-width: 0;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 12px;
  font: inherit;
  font-size: .9rem;
  outline: none;
}

.xiao-form input:focus {
  border-color: var(--a1);
  box-shadow: 0 0 0 4px rgba(25,201,179,.12);
}

.xiao-form button {
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #041225;
  padding: 0 16px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

/* ============ scroll reveal ============ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* Fail-safe: if the timeline is stalled (some preview/export iframes), snap visible. */
html.reveal-snap .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

/* ============ motion presets ============ */
html[data-motion="calm"] .bot, html[data-motion="calm"] .float-card,
html[data-motion="calm"] .hero-panel { animation: none !important; }
html[data-motion="calm"] .visor-scan, html[data-motion="calm"] .flow-svg path { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  .bot, .float-card, .visor-scan, .eye, .antenna::after, .bot-core, .flow-svg path { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ responsive ============ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 10px; }
  .stage { height: 440px; order: -1; }
  .pkg-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-step .connector { display: none; }
  .results-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .nav { display: none; }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .section { padding: 64px 0; }
  .header-inner { gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
  .brand-txt strong { font-size: .95rem; }
  .header-actions { gap: 8px; }
  .lang-toggle { min-height: 42px; padding: 8px 12px; }
  .header-actions .btn-sm { padding: 0 14px; }
  .pkg-grid { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 60px; }
  .stage { height: 380px; transform: scale(.86); }
  .brand-txt small { display: none; }
  .hero-trust { gap: 16px 22px; }
  .cta { padding: 44px 24px; }
  .header-actions .wa span { display: none; }
  .xiao-assistant { right: 16px; bottom: 16px; }
  .xiao-launcher { width: 64px; height: 82px; border-radius: 24px; }
  .xiao-mini-bot { transform: scale(.82); }
  .xiao-panel { bottom: 94px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
