/* RecAi / RecDown 官网 —— 共享样式
   品牌色取自 RecAi App 图标：主紫 #5543CF → 浅紫 #9E93FF 渐变，强调黄 #FFD60A。
   系统字体栈，浅色/深色自适应，移动端优先，尊重 prefers-reduced-motion。 */

:root {
  color-scheme: light dark;

  --brand: #5543cf;
  --brand-2: #9e93ff;
  --brand-gradient: linear-gradient(135deg, #5543cf 0%, #9e93ff 100%);
  --brand-yellow: #ffd60a;

  --bg: #ffffff;
  --bg-alt: #fbf4ff;
  --bg-elevated: #f6edff;
  --bg-muted: #fbf4ff;
  --text: #34284f;
  --text-secondary: #62557f;
  --border: rgba(52, 40, 79, 0.1);
  --accent: #5543cf;
  --accent-text: #ffffff;
  --card-bg: #ffffff;
  --card-bg-alt: #ffffff;
  --card-shadow: 0 1px 2px rgba(52, 40, 79, 0.04), 0 10px 28px rgba(85, 67, 207, 0.12);
  --card-shadow-lg: 0 20px 50px rgba(85, 67, 207, 0.18);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1120px;
  --header-bg: rgba(255, 255, 255, 0.72);

  --store-bg: #1d1430;
  --store-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1320;
    --bg-alt: #201827;
    --bg-elevated: #251d31;
    --bg-muted: #201827;
    --text: #f0e8ff;
    --text-secondary: #b5a6d5;
    --border: rgba(240, 232, 255, 0.1);
    --accent: #a79bff;
    --accent-text: #1a1320;
    --card-bg: #251d31;
    --card-bg-alt: #2b2238;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.5);
    --card-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
    --header-bg: rgba(26, 19, 32, 0.68);
    --store-bg: #f0e8ff;
    --store-text: #1a1320;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 光晕等装饰超出视口时不能撑宽页面，否则手机端会整体缩放、文字被裁 */
html,
body {
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.icon-svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text-secondary);
}

.nav-links a {
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--brand);
}

.lang-switch {
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 13px;
}

.lang-switch:hover {
  color: var(--text);
  border-color: var(--brand-2);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: 88px;
  padding-bottom: 56px;
  text-align: center;
  isolation: isolate;
  overflow-x: clip;
}

.hero::before {
  content: "";
  position: absolute;
  top: -140px;
  left: 50%;
  width: 900px;
  height: 560px;
  transform: translateX(-50%);
  background: radial-gradient(45% 55% at 30% 30%, rgba(85, 67, 207, 0.22), transparent 70%),
    radial-gradient(40% 50% at 75% 40%, rgba(158, 147, 255, 0.24), transparent 70%),
    radial-gradient(35% 40% at 50% 85%, rgba(255, 214, 10, 0.12), transparent 70%);
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .hero::before {
    background: radial-gradient(45% 55% at 30% 30%, rgba(85, 67, 207, 0.35), transparent 70%),
      radial-gradient(40% 50% at 75% 40%, rgba(158, 147, 255, 0.22), transparent 70%),
      radial-gradient(35% 40% at 50% 85%, rgba(255, 214, 10, 0.08), transparent 70%);
  }
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 24px;
  box-shadow: var(--card-shadow-lg);
}

/* macOS 图标自带留白和阴影，不再加圆角和投影 */
.hero-icon.mac-icon {
  width: 128px;
  height: 128px;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 18px 30px rgba(85, 67, 207, 0.25));
}

.hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero p.subtitle {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  color: var(--brand);
  border: 1px solid rgba(85, 67, 207, 0.18);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

@media (prefers-color-scheme: dark) {
  .badge-pill {
    color: var(--brand-2);
  }
}

.badge-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-yellow);
  flex: none;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(85, 67, 207, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(85, 67, 207, 0.45);
}

.btn-store {
  background: var(--store-bg);
  color: var(--store-text);
  flex-direction: row;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.btn-store .store-icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: currentColor;
}

.btn-store .store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.btn-store .store-text small {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.8;
}

.btn-store .store-text strong {
  font-size: 16px;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg-muted);
}

.btn-accent {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(85, 67, 207, 0.35);
}

.hero-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Screenshot showcase ---------- */

.showcase {
  padding-top: 32px;
  padding-bottom: 64px;
  position: relative;
}

.showcase-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.showcase-scroll::-webkit-scrollbar {
  height: 6px;
}

.showcase-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.shot-card {
  flex: none;
  width: 220px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: var(--card-bg);
  transition: transform 0.25s ease;
}

.shot-card:nth-child(even) {
  transform: translateY(10px) rotate(0.4deg);
}

.shot-card:nth-child(odd) {
  transform: translateY(-6px) rotate(-0.4deg);
}

.shot-card img {
  width: 100%;
  height: auto;
}

.mac-shot {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow-lg);
  margin-top: 8px;
}

.mac-shot img {
  width: 100%;
  height: auto;
}

/* ---------- Section ---------- */

.section {
  /* 只设上下，左右留给 .wrap 的边距 */
  padding-top: 64px;
  padding-bottom: 64px;
}

.section--alt {
  background: var(--bg-alt);
}

.section--alt .feature-card,
.section--alt .scenario-card {
  background: var(--card-bg-alt);
}

.section-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 16px;
}

/* ---------- Feature grid ---------- */

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

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--card-shadow);
}

.feature-card .icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--bg-elevated);
  color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  .feature-card .icon-badge {
    color: var(--brand-2);
  }
}

.feature-card h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- Scenario grid (适用场景) ---------- */

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.scenario-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--card-shadow);
  text-align: center;
}

.scenario-card .icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  background: var(--bg-elevated);
  color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  .scenario-card .icon-badge {
    color: var(--brand-2);
  }
}

.scenario-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
}

.scenario-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- Trust / privacy strip ---------- */

.trust-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.faq-item summary {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .chevron {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.faq-item[open] summary .chevron {
  transform: rotate(180deg);
  color: var(--brand);
}

.faq-item p {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-alt);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 0 0 14px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  padding: 5px 0;
}

.footer-col a:hover {
  color: var(--brand);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 10px;
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.footer-tagline {
  max-width: 260px;
  line-height: 1.6;
}

.footer-other-product {
  opacity: 0.85;
  font-size: 12px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 760px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

/* ---------- RecDown-specific accents ---------- */

.recdown-version {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.quality-chip {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  font-size: 13px;
}

.quality-chip strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  .quality-chip strong {
    color: var(--brand-2);
  }
}

.site-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.site-chip {
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Content pages (support / privacy) ---------- */

.content-page {
  padding-top: 56px;
  padding-bottom: 80px;
}

.content-page h1 {
  font-size: clamp(28px, 5vw, 40px);
  margin: 0 0 8px;
}

.content-page .updated {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 40px;
}

.breadcrumbs {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.breadcrumbs a:hover {
  color: var(--brand);
}

.content-page h2 {
  font-size: 20px;
  margin: 40px 0 12px;
}

.content-page p,
.content-page li {
  color: var(--text-secondary);
  font-size: 15px;
}

.content-page ul {
  padding-left: 20px;
}

.content-page .placeholder {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  .content-page .placeholder {
    color: var(--brand-2);
  }
}

.contact-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 28px;
  margin: 24px 0;
  box-shadow: var(--card-shadow);
}

.contact-card a {
  color: var(--brand);
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .contact-card a,
  .content-page a[href^="/"]:not(.btn) {
    color: var(--brand-2);
  }
}

/* ---------- Scroll reveal (respects prefers-reduced-motion) ---------- */

/* 只有脚本跑起来才先隐藏，脚本失败或爬虫不跑脚本时内容照常可见 */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* 首屏内一开始就可见的元素不做入场动画，直接显示，避免刷新时的"渐显闪烁" */
.reveal.is-visible.no-anim {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- 404 ---------- */

.error-code {
  font-size: clamp(64px, 12vw, 120px);
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 8px;
  line-height: 1;
}

@media (max-width: 640px) {
  .nav-links {
    gap: 16px;
  }
  .nav-links .nav-label {
    display: none;
  }
}
