/* ============================================================
   Flow AI — site-wide stylesheet (light theme)
   Shared by index + about + contact + privacy + terms + cookie-policy.
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fd;
  --bg-card: #ffffff;
  --border: rgba(15, 20, 50, 0.1);
  --text: #16182e;
  --text-dim: #4f5068;
  --text-faint: #8b8ca3;
  --primary: #6366f1;
  --primary-2: #8b5cf6;
  --primary-ink: #4f46e5;        /* 浅紫底上的主色文字/图标 */
  --primary-soft: #e9e8fb;       /* 主按钮 / tab 底 */
  --primary-soft-hover: #dddbf7;
  --primary-softer: #eceafd;     /* 图标底 */
  --primary-border: #dcdaf5;     /* 主按钮描边 */
  --accent: #0891b2;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --radius: 16px;
  --shadow: 0 20px 60px rgba(99, 102, 241, 0.16);
  --shadow-sm: 0 6px 24px rgba(15, 20, 50, 0.08);
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.brand img { height: 28px; width: 28px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a.nav-link { color: var(--text-dim); font-size: 0.95rem; transition: color 0.2s; }
.nav a.nav-link:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--primary-soft); color: var(--primary-ink); border-color: var(--primary-border); }
.btn-primary:hover { background: var(--primary-soft-hover); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: rgba(15,20,50,0.28); background: rgba(15,20,50,0.04); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Hero (two-column) ---------- */
.hero {
  position: relative;
  padding: 60px 0 40px;
  overflow: hidden;
  background:
    radial-gradient(640px 420px at 12% -8%, rgba(99,102,241,0.14), transparent 60%),
    radial-gradient(640px 420px at 90% 10%, rgba(139,92,246,0.14), transparent 60%);
}
/* decorative grid backdrop */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(99,102,241,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(700px 480px at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(700px 480px at 50% 0%, #000 0%, transparent 75%);
}
.hero .container { position: relative; z-index: 1; }

.hero-title { text-align: center; margin-bottom: 48px; }

.hero-inner {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 44px;
  align-items: center;
}
.hero-copy {
  text-align: left;
  min-width: 0;
}
.hero-visual {
  min-width: 0;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--text);
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero p.lead {
  max-width: 520px;
  margin: 0 0 30px;
  font-size: 1.12rem;
  line-height: 1.75;
  letter-spacing: 0.003em;
  color: var(--text-dim);
}
.hero p.lead strong {
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn { box-shadow: var(--shadow-sm); }
.hero-cta .btn-lg { padding: 12px 20px; font-size: 0.95rem; }

/* hero visual (instances carousel) */
.hero-visual .carousel { max-width: 100%; }
.hero-visual .instance-meta { padding: 18px 22px 22px; }
.hero-visual .instance-meta h3 { font-size: 1.1rem; }
.hero-visual .instance-meta p { font-size: 0.92rem; }

/* stats strip inside hero */
.hero .stats {
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

/* ---------- Carousel ---------- */
.carousel { position: relative; margin: 0 auto; }
.carousel-viewport { overflow: hidden; border-radius: 20px; }
.carousel-track { display: flex; transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
.carousel-slide {
  flex: 0 0 100%;
  padding: 4px;
}

.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,0.92);
  color: var(--text); font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(15,20,50,0.1); transition: all 0.2s;
  z-index: 5;
}
.carousel-nav:hover { background: #fff; border-color: var(--primary); color: var(--primary); }
.carousel-nav.prev { left: -8px; }
.carousel-nav.next { right: -8px; }

.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.carousel-dot { width: 9px; height: 9px; border-radius: 50%; background: #d4d4e0; border: 0; cursor: pointer; padding: 0; transition: all 0.25s; }
.carousel-dot.active { background: var(--grad); width: 26px; border-radius: 6px; }

/* ---------- Instance showcase ---------- */
.instance-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.instance-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #eef0ff, #f6efff);
}
.instance-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.instance-meta { padding: 22px 26px 26px; text-align: left; }
.instance-meta h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }
.instance-meta p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Section primitives ---------- */
section.section { padding: 64px 0; }
.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head .kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--primary-2);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; letter-spacing: -0.01em; margin-bottom: 14px; color: var(--text); }
.section-head p { color: var(--text-dim); font-size: 1.05rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 8px 8px; }
.stat .num { font-size: 2rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--text-dim); font-size: 0.9rem; margin-top: 2px; }

/* ---------- Grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(99,102,241,0.4); box-shadow: 0 16px 40px rgba(99,102,241,0.1); }
.card .ic {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--primary-softer); color: var(--primary-ink);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.ic svg { width: 22px; height: 22px; }
.ic-sm svg { width: 20px; height: 20px; }
.card h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--text); }
.card p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Use cases ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.tab { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-dim); cursor: pointer; font-size: 0.9rem; transition: all 0.2s; }
.tab:hover { color: var(--text); border-color: rgba(99,102,241,0.4); }
.tab.active { background: var(--primary-soft); color: var(--primary-ink); border-color: var(--primary-border); }
.case-card { display: none; }
.case-card.active { display: block; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 26px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--primary-2);
  display: block;
  margin-bottom: 12px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--text); }
.step p { color: var(--text-dim); font-size: 0.9rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: var(--bg-card); }
.faq-q { width: 100%; background: none; border: 0; color: var(--text); font-size: 1rem; font-weight: 600; padding: 18px 20px; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-q .chev { transition: transform 0.25s; color: var(--text-dim); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p { padding: 0 20px 20px; color: var(--text-dim); font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  border-radius: 22px;
  background: linear-gradient(135deg, #eef0ff, #f6efff);
  border: 1px solid var(--border);
  padding: 56px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; color: var(--text); margin-bottom: 14px; }
.cta-band p { color: var(--text-dim); font-size: 1.1rem; margin-bottom: 34px; }
.cta-band .btn-primary { background: var(--primary); color: #fff; box-shadow: none; }
.cta-band .btn-ghost { border-color: var(--border); color: var(--text); }
.cta-band .btn-ghost:hover { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.4); }

/* ---------- Page header (sub pages) ---------- */
.page-head { padding: 56px 0 24px; text-align: center; }

/* ---------- About page ---------- */
.about-mission { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.about-text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.01em; margin-bottom: 16px; color: var(--text); }
.about-text p { color: var(--text-dim); font-size: 1.02rem; margin-bottom: 14px; }
.about-text p strong {
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.about-facts { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 26px; box-shadow: var(--shadow-sm); }
.about-facts h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 10px; }
.about-facts ul { list-style: none; }
.about-facts li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.about-facts li:last-child { border-bottom: 0; }
.about-facts li span:first-child { color: var(--text-faint); font-weight: 600; white-space: nowrap; }
.about-facts li span:last-child { color: var(--text); font-weight: 500; text-align: right; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; color: var(--text); }
.page-head p { color: var(--text-dim); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }

/* ---------- Legal / prose ---------- */
.prose { max-width: 820px; margin: 0 auto; padding: 20px 0 80px; color: var(--text-dim); }
.prose h2 { color: var(--text); font-size: 1.5rem; margin: 40px 0 14px; }
.prose h3 { color: var(--text); font-size: 1.15rem; margin: 28px 0 10px; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 16px 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--primary-2); }
.prose .updated { font-family: var(--mono); font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Contact / custom ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.9rem; color: var(--text-dim); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
  font-family: var(--font); font-size: 0.95rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 60px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; margin-top: 14px; max-width: 260px; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 0.92rem; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--border); padding-top: 24px; color: var(--text-faint); font-size: 0.82rem; }
.footer-bottom .legal-links a { color: var(--text-faint); margin-left: 18px; }
.footer-bottom .legal-links a:hover { color: var(--text); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
.burger { display: none; background: none; border: 0; color: var(--text); font-size: 1.6rem; cursor: pointer; }
@media (max-width: 768px) {
  .nav { position: fixed; inset: 68px 0 auto 0; background: #fff; flex-direction: column; gap: 4px; padding: 16px 24px 24px; border-bottom: 1px solid var(--border); display: none; }
  .nav.open { display: flex; }
  .nav a.nav-link { padding: 10px 0; font-size: 1.05rem; }
  .burger { display: block; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-copy { text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-mission { grid-template-columns: 1fr; gap: 32px; }
  .about-facts li { flex-direction: column; gap: 4px; }
  .header-actions .btn-ghost { display: none; }
}
