/* ==========================================================================
   Tepeu — Design System based on "Cohere" reference
   - White canvas, cool gray borders, 22px signature radius
   - Serif display + sans body, mono uppercase labels
   - Interaction Blue #1863dc for hover/focus only
   - Purple reserved for full-width bands, never card surfaces
   ========================================================================== */

:root {
  /* Color tokens (from design spec) */
  --black: #000000;
  --near-black: #212121;
  --dark: #17171c;
  --blue: #1863dc;
  --ring-blue: rgba(76, 110, 230, 0.5);
  --focus-purple: #9b60aa;
  --error: #b30000;
  --white: #ffffff;
  --snow: #fafafa;
  --gray-1: #f2f2f2;
  --muted: #93939f;
  --border-cool: #d9d9dd;
  --border-light: #e5e7eb;

  /* Purple band gradient */
  --purple-a: #1d1030;
  --purple-b: #311b52;
  --purple-c: #3d2266;

  /* Type stacks */
  --font-display: 'Newsreader', 'Noto Serif SC', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', 'Noto Sans SC', Arial, ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* Radius scale */
  --r-sig: 22px;  /* THE signature radius — primary cards, images, containers */
  --r-lg: 20px;
  --r-md: 16px;
  --r-sm: 8px;    /* dialogs, secondary containers */
  --r-xs: 4px;    /* nav elements, small tags */

  /* Layout */
  --container: 1200px;
  --section-gap: clamp(64px, 8vw, 104px);
  --header-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--near-black);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(24, 99, 220, 0.14); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

section { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Type roles ---------- */
.display-hero {
  font-family: var(--font-display);
  font-size: clamp(42px, 6.4vw, 72px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--black);
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.h-section {
  font-family: var(--font-body);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--black);
}

.h-card {
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--black);
}

.body-lg { font-size: 18px; line-height: 1.4; color: var(--near-black); }
.body-md { font-size: 16px; line-height: 1.5; }
.body-muted { color: var(--muted); }
.caption { font-size: 14px; line-height: 1.4; color: var(--muted); }

.label-mono {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.28px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  padding: 12px 24px;
  border-radius: 9999px;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, opacity .18s ease;
  white-space: nowrap;
}

.btn-sm { font-size: 14px; font-weight: 500; line-height: 1.71; padding: 8px 16px; }

/* Ghost — the base state, invisible until interacted with */
.btn-ghost { background: transparent; color: var(--black); padding-inline: 20px; }
.btn-ghost:hover { color: var(--blue); opacity: 0.8; }

/* Dark solid — for CTA on light surfaces */
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--blue); }

/* Outlined — secondary actions */
.btn-outline { background: transparent; border: 1px solid var(--border-cool); color: var(--near-black); }
.btn-outline:hover { border-color: var(--black); color: var(--blue); }

/* Light variants for dark/purple surfaces */
.btn-ghost-light { background: transparent; color: var(--white); padding-inline: 20px; }
.btn-ghost-light:hover { opacity: 0.8; color: var(--white); }

.btn-outline-light { background: transparent; border: 1px solid rgba(255, 255, 255, 0.32); color: var(--white); }
.btn-outline-light:hover { border-color: var(--white); color: var(--white); opacity: 0.9; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--gray-1); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--black);
  color: var(--white);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
  padding-bottom: 2px;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--black);
  white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 16px;
  color: var(--near-black);
  padding: 10px 14px;
  border-radius: var(--r-xs);
  white-space: nowrap;
  transition: color .18s ease, opacity .18s ease;
}
.nav-links a:hover { color: var(--blue); opacity: 0.85; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* 导航登录态容器(内容由 main.js 动态渲染) */
[data-nav-auth] { display: inline-flex; align-items: center; gap: 10px; }

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28px;
  text-transform: uppercase;
  color: var(--near-black);
  border: 1px solid var(--border-cool);
  border-radius: 9999px;
  padding: 6px 12px;
  white-space: nowrap;
  transition: border-color .18s ease, color .18s ease;
}
.lang-toggle:hover { border-color: var(--black); color: var(--blue); }

.nav-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: grid; place-items: center;
  font-size: 12px;
  flex: none;
}
.user-email {
  font-size: 14px;
  color: var(--near-black);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-btn { display: none; width: 42px; height: 42px; border-radius: var(--r-xs); place-items: center; }
.menu-btn:hover { color: var(--blue); }

/* Mobile menu panel */
.mobile-menu {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border-cool);
  padding: 12px 24px 20px;
  /* 横屏等矮视口下可滚动,保证底部入口可达 */
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu > a,
.mobile-menu > button.mm-logout {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 6px;
  font-size: 16px;
  color: var(--near-black);
  border-bottom: 1px solid var(--gray-1);
}
.mobile-menu > a:hover,
.mobile-menu > button.mm-logout:hover { color: var(--blue); }
.mobile-menu .mm-cta { margin-top: 16px; display: flex; gap: 12px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 88px); text-align: center; }
.hero .label-mono { display: block; margin-bottom: 28px; }
.hero-title { max-width: 900px; margin-inline: auto; }
.hero-sub {
  max-width: 640px;
  margin: 28px auto 0;
  font-size: 18px;
  line-height: 1.4;
  color: var(--near-black);
}
.hero-actions {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-meta { margin-top: 32px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.28px; text-transform: uppercase; color: var(--muted); }

/* ---------- Features ---------- */
.section { padding-block: var(--section-gap); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head .label-mono { display: block; margin-bottom: 18px; }
.section-head .body-lg { margin-top: 16px; color: var(--muted); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* The 22px signature card */
.card {
  background: var(--white);
  border: 1px solid var(--gray-1);
  border-radius: var(--r-sig);
  padding: 32px;
  transition: border-color .2s ease;
}
.card:hover { border-color: var(--border-cool); }

.card .card-icon { color: var(--black); margin-bottom: 22px; }
.card .h-card { margin-bottom: 12px; }
.card .body-md { color: var(--muted); }

/* ---------- Purple band (full-width, bottom-only 22px rounding) ---------- */
.band {
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(155, 96, 170, 0.28) 0%, rgba(155, 96, 170, 0) 55%),
    linear-gradient(160deg, var(--purple-a) 0%, var(--purple-b) 52%, var(--purple-c) 100%);
  color: var(--white);
  border-radius: 0 0 var(--r-sig) var(--r-sig);
  padding-block: var(--section-gap);
}

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}

.band .label-mono { color: rgba(255, 255, 255, 0.64); display: block; margin-bottom: 18px; }
.band .display-lg { color: var(--white); }
.band .body-lg { margin-top: 22px; color: rgba(255, 255, 255, 0.78); max-width: 460px; }
.band .band-points { margin-top: 28px; display: grid; gap: 12px; }
.band .band-points li {
  display: flex; gap: 10px; align-items: baseline;
  font-size: 16px; color: rgba(255, 255, 255, 0.85);
}
.band .band-points .tick { color: rgba(255, 255, 255, 0.85); flex: none; transform: translateY(1px); }

/* ---------- Mock app window ---------- */
.window {
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-sig);
  overflow: hidden;
  color: #e9e9f0;
  font-size: 14px;
}

.win-titlebar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.win-dots { display: flex; gap: 7px; }
.win-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.win-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.win-body { display: grid; grid-template-columns: 172px minmax(0, 1fr); }

.win-side {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 10px;
  display: flex; flex-direction: column; gap: 3px;
}
.win-side span { padding: 9px 12px; border-radius: var(--r-sm); color: rgba(255, 255, 255, 0.55); cursor: default; }
.win-side .active { background: rgba(255, 255, 255, 0.08); color: var(--white); }

.win-main { padding: 20px 22px 16px; display: flex; flex-direction: column; gap: 14px; }

.bubble-user {
  align-self: flex-end;
  max-width: 82%;
  background: #2b2b35;
  color: var(--white);
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  line-height: 1.5;
}

.win-agent { display: grid; gap: 10px; color: rgba(255, 255, 255, 0.55); }
.win-agent .agent-line { color: rgba(255, 255, 255, 0.85); }

.step { display: flex; align-items: flex-start; gap: 10px; line-height: 1.45; }
.step-dot {
  flex: none;
  width: 18px; height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px;
}
.step.done .step-dot { background: #4c6ee6; color: var(--white); }
.step.run .step-dot { border: 2px solid #4c6ee6; }
.step.done, .step.run { color: rgba(255, 255, 255, 0.85); }
.step.run .step-dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4c6ee6; }

.progress { height: 4px; border-radius: 9999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-top: 2px; }
.progress i { display: block; width: 68%; height: 100%; background: #4c6ee6; border-radius: inherit; }

.confirm-box {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid; gap: 10px;
}
.confirm-box p { line-height: 1.5; color: rgba(255, 255, 255, 0.88); }
.confirm-actions { display: flex; gap: 8px; }
.chip {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.85);
}
.chip.primary { background: #4c6ee6; border-color: #4c6ee6; color: var(--white); }

.win-statusbar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 18px;
  display: flex; gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.win-statusbar .ok { color: #8fa8ff; }

/* ---------- How it works ---------- */
.how { background: var(--snow); border-block: 1px solid var(--gray-1); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card {
  background: var(--white);
  border: 1px solid var(--gray-1);
  border-radius: var(--r-sig);
  padding: 32px;
  transition: border-color .2s ease;
}
.step-card:hover { border-color: var(--border-cool); }
.step-num {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.28px;
  color: var(--muted);
  display: block;
  margin-bottom: 20px;
}
.step-card .h-card { margin-bottom: 12px; }
.step-card .body-md { color: var(--muted); }

/* ---------- Download ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dl-card {
  background: var(--white);
  border: 1px solid var(--border-cool);
  border-radius: var(--r-sig);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s ease;
}
.dl-card:hover { border-color: var(--black); }
.dl-os { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.28px; text-transform: uppercase; color: var(--muted); }
.dl-name { font-family: var(--font-body); font-size: 32px; line-height: 1.2; letter-spacing: -0.01em; color: var(--black); margin-top: 2px; }
.dl-meta { font-size: 14px; line-height: 1.4; color: var(--muted); min-height: 42px; margin-bottom: 14px; }
.dl-card .btn { margin-top: auto; }
.dl-sum {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16px;
  text-transform: uppercase;
  color: var(--muted);
  word-break: break-all;
}
.dl-foot {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dl-foot p { font-size: 14px; line-height: 1.5; color: var(--muted); }
.dl-foot a { color: var(--near-black); text-decoration: underline; text-underline-offset: 3px; transition: color .18s ease; }
.dl-foot a:hover { color: var(--blue); }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 760px; margin-inline: auto; }
.faq-head { text-align: center; margin-bottom: 40px; }
.faq-head .label-mono { display: block; margin-bottom: 18px; }

.faq-item { border-bottom: 1px solid var(--border-cool); }
.faq-item:first-of-type { border-top: 1px solid var(--border-cool); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  padding: 24px 4px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--black);
  transition: color .18s ease;
}
.faq-q:hover { color: var(--blue); }
.faq-q svg { flex: none; transition: transform .3s ease; }
.faq-q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease;
}
.faq-a.open { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; min-height: 0; }
.faq-a-inner p { padding: 0 4px 24px; max-width: 640px; color: var(--muted); }

/* ---------- Footer (dusk gradient to black) ---------- */
.site-footer {
  margin-top: var(--section-gap);
  background: linear-gradient(180deg, var(--dark) 0%, var(--black) 100%);
  color: var(--white);
  border-radius: var(--r-sig) var(--r-sig) 0 0;
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
}
.footer-brand .brand-name { color: var(--white); }
.footer-brand .brand-mark { background: var(--white); color: var(--black); }
.footer-brand p { margin-top: 16px; max-width: 300px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.28px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.footer-col li { margin-bottom: 12px; }
.footer-col a { font-size: 12px; color: var(--muted); transition: color .18s ease; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Login page ---------- */
.auth-page { background: var(--snow); min-height: 100vh; display: flex; flex-direction: column; }

.auth-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 48px 24px 72px;
}

.auth-card {
  width: 100%;
  max-width: 920px;
  background: var(--white);
  border: 1px solid var(--border-cool);
  border-radius: var(--r-sig);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.auth-panel {
  /* 深色面板:遵循「紫色仅用于全宽横幅,不作卡片表面」的规范,采用页脚同款 dusk 渐变 */
  background: linear-gradient(180deg, var(--dark) 0%, var(--black) 100%);
  color: var(--white);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
}
.auth-panel .label-mono { color: rgba(255, 255, 255, 0.64); }
.auth-panel blockquote {
  margin: 28px 0 0;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.auth-panel ul { margin-top: auto; padding-top: 40px; display: grid; gap: 16px; }
.auth-panel li { display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.auth-panel .tick { color: rgba(255, 255, 255, 0.85); flex: none; transform: translateY(1px); }

.auth-form-side { padding: 48px 40px; display: flex; flex-direction: column; }

.auth-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--gray-1);
  margin-bottom: 28px;
}
.auth-tab {
  font-size: 16px;
  color: var(--muted);
  padding: 0 2px 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .18s ease, border-color .18s ease;
}
.auth-tab:hover { color: var(--blue); }
.auth-tab.active { color: var(--black); border-bottom-color: var(--black); }

.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 14px; color: var(--near-black); }
.field input {
  font: 400 16px/1.4 var(--font-body);
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--border-cool);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  width: 100%;
  transition: border-color .18s ease;
}
.field input::placeholder { color: var(--muted); }
.field input:focus { outline: none; border-color: var(--focus-purple); }
.field input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* 错误态:红色描边 + 2px 红 ring(按设计文件 rgb(179,0,0) 0 0 0 2px) */
.field input.input-error { border-color: var(--error); box-shadow: 0 0 0 2px rgb(179, 0, 0); }

.form-error {
  display: none;
  font-size: 14px;
  line-height: 1.4;
  color: var(--error);
  margin: -6px 0 16px;
}
.form-error.show { display: block; }

.form-success {
  display: none;
  font-size: 14px;
  line-height: 1.4;
  color: var(--blue);
  margin: -6px 0 16px;
}
.form-success.show { display: block; }

.auth-submit { width: 100%; margin-top: 8px; }

.auth-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-1);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

/* Logged-in state */
.logged-box { display: none; }
.logged-box.show { display: block; }
.logged-box .h-card { margin-bottom: 10px; }
.logged-as { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.logged-email { font-size: 16px; color: var(--black); margin-bottom: 28px; word-break: break-all; }
.logged-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Auth page header */
.auth-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--gray-1);
  background: var(--white);
}
.auth-header-right { display: flex; align-items: center; gap: 12px; }

/* ---------- Reveal animation (仅在有 JS 时启用,保证无 JS 也能看到全部内容) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  /* border-color 一并过渡,避免覆盖 .card 等的悬停边框动画 */
  transition: opacity .7s ease var(--d, 0s), transform .7s ease var(--d, 0s), border-color .2s ease;
}
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .faq-a { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-grid, .how-grid, .dl-grid { grid-template-columns: repeat(2, 1fr); }
  .band-grid { grid-template-columns: 1fr; gap: 44px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 999px) {
  .nav-links, .nav-actions .nav-login, .nav-actions .nav-cta, .nav-actions [data-nav-auth] { display: none; }
  .menu-btn { display: grid; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
  .auth-form-side { padding: 40px 28px; }
}

/* 桌面宽度下强制隐藏移动菜单(防止窗口拉宽后菜单残留) */
@media (min-width: 1000px) {
  .mobile-menu { display: none !important; }
}

@media (max-width: 640px) {
  .feature-grid, .how-grid, .dl-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; max-width: 360px; }
  .card, .step-card, .dl-card { padding: 24px; }
  .win-body { grid-template-columns: 1fr; }
  .win-side { display: none; }
  .user-email { max-width: 120px; }
}
