/* ============================================================
   Inkwell Engine · 宣传站 — base.css
   深空墨屋（Ink House Editorial）：深空蓝底 + 全息墨渐变
   ============================================================ */

:root {
  /* 深空底色（取自 logo 容器渐变） */
  --bg-0: #05080f;
  --bg-1: #0b1730;
  --bg-2: #0e1e3a;

  /* 全息墨滴五色（取自 logo 渐变） */
  --ink-cyan: #34e0e8;
  --ink-blue: #3d8bff;
  --ink-violet: #8b5cf6;
  --ink-pink: #ff4fa3;
  --ink-amber: #ffb43d;

  --grad-ink: linear-gradient(100deg,
    var(--ink-cyan) 0%, var(--ink-blue) 28%,
    var(--ink-violet) 52%, var(--ink-pink) 76%, var(--ink-amber) 100%);

  /* 文字 */
  --text-hi: #eef3fb;
  --text-mid: #a9b7d0;
  --text-low: #66759280;

  --text-mid-strong: #a9b7d0;
  --text-low-strong: #6b7a96;

  --line: rgba(140, 170, 220, 0.14);
  --line-soft: rgba(140, 170, 220, 0.08);
  --card: rgba(16, 30, 56, 0.52);
  --card-raise: rgba(20, 38, 70, 0.72);

  /* 字体：衬线展示（墨/出版意象）+ 中文黑体 + 等宽（机器之声） */
  --font-display: "Palatino Linotype", "Palatino", "Georgia", "Times New Roman", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-mono: "Cascadia Code", "Consolas", "JetBrains Mono", "Menlo", monospace;

  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-hi);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(61, 139, 255, 0.35); color: #fff; }

/* ---------- 大气层：极光 + 星尘 + 颗粒 ---------- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.aurora.a1 {
  width: 720px; height: 720px;
  left: -220px; top: -260px;
  background: radial-gradient(circle, rgba(52, 224, 232, 0.34), transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.aurora.a2 {
  width: 820px; height: 820px;
  right: -280px; top: 8%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.26), transparent 65%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.aurora.a3 {
  width: 640px; height: 640px;
  left: 32%; bottom: -320px;
  background: radial-gradient(circle, rgba(255, 79, 163, 0.17), transparent 65%);
  animation: drift3 38s ease-in-out infinite alternate;
}
.aurora.a4 {
  width: 560px; height: 560px;
  right: 12%; bottom: -200px;
  background: radial-gradient(circle, rgba(255, 180, 61, 0.12), transparent 65%);
  animation: drift1 44s ease-in-out infinite alternate-reverse;
}

@keyframes drift1 { to { transform: translate(90px, 60px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-110px, 80px) scale(0.94); } }
@keyframes drift3 { to { transform: translate(60px, -90px) scale(1.1); } }

/* 星尘：两层细网格 + 微光点 */
.stardust {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 18% 32%, rgba(255,255,255,0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 14%, rgba(255,255,255,0.4) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 44% 71%, rgba(52,224,232,0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 58%, rgba(255,255,255,0.35) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 8% 84%, rgba(255,180,61,0.45) 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 44%, rgba(139,92,246,0.5) 50%, transparent 51%);
  background-size: 640px 640px;
  opacity: 0.5;
  animation: twinkle 9s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.28; } to { opacity: 0.6; } }

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- 版式 ---------- */

.serif { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); }

.ink-text {
  background: var(--grad-ink);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: inkshift 8s ease-in-out infinite alternate;
}
@keyframes inkshift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* 章节眉标：serif 编号 + 中文题 */
.kicker {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
}
.kicker .no {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--ink-cyan);
}
.kicker .rule {
  flex: 0 0 56px;
  height: 1px;
  background: var(--grad-ink);
  opacity: 0.7;
  align-self: center;
}
.kicker .tag {
  font-size: 13px;
  letter-spacing: 0.42em;
  color: var(--text-low-strong);
}

h2.sec-title {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-bottom: 14px;
}
.sec-sub {
  color: var(--text-mid);
  font-size: 16.5px;
  max-width: 640px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-ink {
  color: #04101c;
  background: var(--grad-ink);
  background-size: 180% 100%;
  box-shadow: 0 8px 32px rgba(61, 139, 255, 0.35), 0 2px 8px rgba(52, 224, 232, 0.22);
}
.btn-ink:hover {
  transform: translateY(-2px);
  background-position: 80% 50%;
  box-shadow: 0 14px 44px rgba(61, 139, 255, 0.5), 0 4px 14px rgba(255, 79, 163, 0.3);
}

.btn-ghost {
  color: var(--text-hi);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  border-color: rgba(52, 224, 232, 0.5);
  background: rgba(52, 224, 232, 0.07);
  transform: translateY(-2px);
}

.btn .arr { transition: transform 0.25s ease; }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- 卡片 ---------- */

.glass-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 224, 232, 0.28);
  background: var(--card-raise);
}

/* 卡片顶部墨光 hairline */
.glass-card::before {
  content: "";
  position: absolute;
  top: 0; left: 22px; right: 22px;
  height: 1px;
  background: var(--grad-ink);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.glass-card:hover::before { opacity: 0.85; }

/* ---------- 滚动浮现 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.22s; }
.reveal.d3 { transition-delay: 0.34s; }
.reveal.d4 { transition-delay: 0.46s; }

/* ---------- 入场（首屏一次性编排） ---------- */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(34px); }
  to { opacity: 1; transform: none; }
}
.rise { opacity: 0; animation: riseIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.rise.r1 { animation-delay: 0.05s; }
.rise.r2 { animation-delay: 0.18s; }
.rise.r3 { animation-delay: 0.32s; }
.rise.r4 { animation-delay: 0.48s; }
.rise.r5 { animation-delay: 0.62s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- 深色页上的浅色演示面：统一降亮度，避免大面积白窗刺眼 ----------
   动画窗体与浅色 mock 演示真实产品（浅色 UI），整站为深色舞台；
   按 ~90% 亮度呈现使白窗"嵌入"页面而非直射。录制页同载 base.css，
   因此成片与落地页观感一致。 */
.sc-window, .pf-window, .mb-screen,
.pm, .imp-win, .studio, .mphone {
  filter: brightness(0.9) saturate(0.97);
}
