/* ==========================================================================
   云页 AI / Yunye AI — Marketing Site Stylesheet
   Pure static CSS. No external fonts, frameworks, or CDNs.
   Mobile-first, responsive via clamp()/Grid/Flex + media queries.
   Brand name "云页 AI" / "Yunye AI" is a PLACEHOLDER — replace globally.
   ========================================================================== */

:root {
  --color-brand: #2563eb;        /* primary blue */
  --color-brand-dark: #1d4ed8;
  --color-accent: #10b981;       /* emerald green (翠绿) */
  --color-accent-dark: #059669;
  --color-ink: #0f172a;          /* slate-900 */
  --color-body: #475569;         /* slate-600 */
  --color-muted: #94a3b8;        /* slate-400 */
  --color-line: #e2e8f0;         /* slate-200 */
  --color-bg: #ffffff;
  --color-bg-soft: #f8fafc;      /* slate-50 */
  --color-bg-tint: #eff6ff;      /* blue-50 */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 24px 60px -20px rgba(37, 99, 235, .35);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-body);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--color-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--color-ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }
p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 28px);
}

.text-center { text-align: center; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--color-body); }
.muted { color: var(--color-muted); }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-brand);
  background: var(--color-bg-tint);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--color-ink);
  font-size: 1.15rem;
}
.brand:hover { text-decoration: none; }
.brand .logo-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 1rem;
  box-shadow: var(--shadow-sm);
}
.brand .brand-en { color: var(--color-muted); font-weight: 600; font-size: .85rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--color-body);
  font-weight: 600;
  font-size: .95rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--color-brand); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch a {
  font-weight: 700; font-size: .9rem;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--color-line);
  color: var(--color-body);
}
.lang-switch a:hover { border-color: var(--color-brand); color: var(--color-brand); text-decoration: none; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: ""; display: block;
  width: 20px; height: 2px; background: var(--color-ink);
  position: relative; transition: .2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: .98rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--color-accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-brand { background: var(--color-brand); color: #fff; }
.btn-brand:hover { background: var(--color-brand-dark); }
.btn-ghost { background: #fff; color: var(--color-ink); border-color: var(--color-line); }
.btn-ghost:hover { border-color: var(--color-brand); color: var(--color-brand); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 96px) 0 clamp(40px, 7vw, 72px);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(16,185,129,.12), transparent 60%),
    radial-gradient(1000px 500px at 0% 0%, rgba(37,99,235,.12), transparent 55%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  grid-template-columns: 1fr;
}
.hero h1 { margin-bottom: .35em; }
.hero .lead { max-width: 36ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* device mock (pure CSS) */
.device {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 360px;
  margin-inline: auto;
}
.device-bar { height: 28px; background: var(--color-bg-soft); border-bottom: 1px solid var(--color-line); display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.device-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--color-line); display: inline-block; }
.device-body { padding: 18px; }
.device-body .skeleton { border-radius: 8px; background: linear-gradient(90deg,#eef2f7,#e2e8f0,#eef2f7); background-size: 200% 100%; animation: shimmer 1.6s infinite; margin-bottom: 12px; }
.device-body .skeleton.title { height: 22px; width: 70%; }
.device-body .skeleton.line { height: 12px; width: 100%; }
.device-body .skeleton.line.short { width: 55%; }
.device-body .skeleton.btn { height: 38px; width: 50%; border-radius: 999px; background: linear-gradient(135deg,var(--color-brand),var(--color-accent)); animation: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Sections ---------- */
section { padding: clamp(48px, 8vw, 88px) 0; }
.section-soft { background: var(--color-bg-soft); }
.section-head { max-width: 720px; margin: 0 auto clamp(28px, 5vw, 48px); }
.section-head p { color: var(--color-body); }

/* ---------- Card grids ---------- */
.grid { display: grid; gap: clamp(16px, 3vw, 24px); grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cbd5e1; }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--color-bg-tint); color: var(--color-brand);
  font-size: 1.4rem; margin-bottom: 14px; font-weight: 800;
}
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--color-body); }

/* ---------- Workflow ---------- */
.steps { counter-reset: step; }
.step {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; top: -14px; left: 20px;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  color: #fff; font-weight: 800; display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.step h3 { margin-top: 8px; }

/* ---------- Templates ---------- */
.tpl-card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease;
}
.tpl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tpl-thumb {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1.1rem;
  text-align: center; padding: 16px;
}
.tpl-thumb.biz   { background: linear-gradient(135deg, #2563eb, #1e40af); }
.tpl-thumb.food  { background: linear-gradient(135deg, #f97316, #ea580c); }
.tpl-thumb.event { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.tpl-thumb.shop  { background: linear-gradient(135deg, #10b981, #047857); }
.tpl-thumb.saas  { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.tpl-thumb.edu   { background: linear-gradient(135deg, #ec4899, #be185d); }
.tpl-meta { padding: 16px 18px; }
.tpl-meta h3 { margin: 0 0 4px; font-size: 1.05rem; }
.tpl-meta p { margin: 0; color: var(--color-body); font-size: .92rem; }

/* ---------- Pricing ---------- */
.price-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.price-card.featured {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.price-card.featured::after {
  content: "推荐";
  position: absolute; top: 18px; right: 18px;
  background: var(--color-accent); color: #fff;
  font-size: .75rem; font-weight: 800;
  padding: 4px 10px; border-radius: 999px;
}
.price-name { font-size: 1.2rem; font-weight: 800; color: var(--color-ink); }
.price-amount { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 900; color: var(--color-ink); margin: 8px 0 2px; }
.price-amount small { font-size: 1rem; font-weight: 600; color: var(--color-muted); }
.price-desc { color: var(--color-body); min-height: 44px; }
.price-feats { list-style: none; margin: 18px 0 24px; padding: 0; display: grid; gap: 10px; }
.price-feats li { display: flex; gap: 10px; align-items: flex-start; color: var(--color-body); font-size: .95rem; }
.price-feats li::before { content: "✓"; color: var(--color-accent); font-weight: 800; }
.price-feats li.no::before { content: "—"; color: var(--color-muted); }
.price-feats li.no { color: var(--color-muted); }
.price-card .btn { margin-top: auto; }

/* ---------- Testimonials ---------- */
.quote {
  background: #fff; border: 1px solid var(--color-line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.quote p { font-size: 1.02rem; color: var(--color-ink); }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.quote .avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg,var(--color-brand),var(--color-accent)); color:#fff; display:grid; place-items:center; font-weight:800; }
.quote .who b { color: var(--color-ink); display: block; }
.quote .who span { color: var(--color-muted); font-size: .85rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; }
details.faq-item {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 4px 18px;
  margin-bottom: 12px;
  background: #fff;
}
details.faq-item summary {
  cursor: pointer; list-style: none;
  font-weight: 700; color: var(--color-ink);
  padding: 14px 0; display: flex; justify-content: space-between; align-items: center;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--color-brand); font-weight: 800; }
details.faq-item[open] summary::after { content: "−"; }
details.faq-item p { padding: 0 0 16px; margin: 0; color: var(--color-body); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  color: #fff; border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 56px);
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 52ch; margin-inline: auto; }
.cta-band .btn-primary { background: #fff; color: var(--color-brand); }
.cta-band .btn-primary:hover { background: #f1f5f9; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.cta-band .btn-ghost:hover { border-color: #fff; color: #fff; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .9rem; color: var(--color-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--color-muted); }
.breadcrumb span { margin: 0 8px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 18px; max-width: 560px; }
.field label { display: block; font-weight: 700; color: var(--color-ink); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--color-ink);
  padding: 12px 14px; border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--color-muted); }
.form-ok {
  display: none; margin-top: 16px; padding: 14px 18px;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857;
  border-radius: var(--radius-sm); font-weight: 600;
}
.form-ok.show { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: #cbd5e1;
  padding: clamp(40px, 6vw, 64px) 0 28px;
}
.footer-grid {
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
}
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid a { color: #cbd5e1; display: block; padding: 4px 0; font-size: .95rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand .brand { color: #fff; }
.footer-brand p { color: #94a3b8; max-width: 32ch; }
.footer-bottom {
  border-top: 1px solid #1e293b; margin-top: 28px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  font-size: .88rem; color: #94a3b8;
}
.footer-bottom a { color: #94a3b8; }
.footer-lang a { color: #cbd5e1; margin-left: 10px; }
.footer-lang a:hover { color: #fff; }

/* ---------- Skip link (a11y) ---------- */
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }

/* ==========================================================================
   Responsive — mobile first; enhance at >=720px and >=960px
   ========================================================================== */
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
}

@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Mobile nav: collapse links into a togglable panel below 860px */
@media (max-width: 859px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--color-line);
    padding: 8px 16px 16px;
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 80vh; box-shadow: var(--shadow); }
  .nav-links li { border-bottom: 1px solid var(--color-line); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { display: block; padding: 12px 4px; }
  .nav-actions .lang-switch { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
