/* ============================================================
   语音合成工具集 — 全局共享样式
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.86);
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --pro-purple: #7c3aed;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --nav-height: 60px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--nav-height);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
}

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

/* ============================================================
   背景光斑
   ============================================================ */

.bg-orb {
  position: fixed;
  pointer-events: none;
  filter: blur(50px);
  opacity: 0.65;
  z-index: 0;
}

.bg-orb-a {
  top: 8vh;
  left: -5vw;
  width: 16rem;
  height: 16rem;
  background: rgba(124, 58, 237, 0.08);
}

.bg-orb-b {
  right: -3vw;
  bottom: 8vh;
  width: 18rem;
  height: 18rem;
  background: rgba(37, 99, 235, 0.08);
}

/* ============================================================
   导航栏
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 20px rgba(15, 23, 42, 0.04);
}

.nav-inner {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity 160ms ease;
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--muted);
  transition: color 160ms ease, background 160ms ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

.nav-link.active {
  color: var(--pro-purple);
  background: rgba(124, 58, 237, 0.08);
}

/* ============================================================
   页面外壳
   ============================================================ */

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 28px;
}

/* ============================================================
   产品卡片（首页）
   ============================================================ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 28px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.10);
}

.product-card.card-portable:hover {
  border-color: rgba(37, 99, 235, 0.30);
}

.product-card.card-pro:hover {
  border-color: rgba(124, 58, 237, 0.30);
}

.product-card-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  object-fit: contain;
  margin-bottom: 18px;
}

.product-card-title {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.product-card-subtitle {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--line);
}

.product-card-desc {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 30ch;
}

.product-card-link {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card-link:hover {
  transform: translateY(-1px);
}

.card-portable .product-card-link {
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: white;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.card-pro .product-card-link {
  background: linear-gradient(135deg, var(--pro-purple), #0ea5e9);
  color: white;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.24);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 4px 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer a {
  color: var(--text);
  font-weight: 700;
}

/* ============================================================
   首页 Hero
   ============================================================ */

.home-hero {
  text-align: center;
  padding: 28px 0 10px;
}

.home-hero h1 {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: #020617;
}

.home-hero .lead {
  margin: 18px auto 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .product-card {
    padding: 28px 20px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 16px;
  }

  .nav-links {
    gap: 0;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .nav-logo {
    font-size: 0.95rem;
  }

  .home-hero h1 {
    font-size: clamp(1.8rem, 10vw, 2.4rem);
  }
}

/* ============================================================
   爱发电公告横幅
   ============================================================ */

.aifadian-banner {
  margin: 0 0 36px;
  background: linear-gradient(135deg, #fdf2f8 0%, #fef3c7 30%, #fce7f3 60%, #ede9fe 100%);
  border: 2px solid rgba(236, 72, 153, 0.28);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
  animation: banner-glow 3s ease-in-out infinite alternate;
}

@keyframes banner-glow {
  0%   { box-shadow: 0 8px 32px rgba(236, 72, 153, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04); }
  100% { box-shadow: 0 12px 40px rgba(236, 72, 153, 0.22), 0 4px 16px rgba(15, 23, 42, 0.08); }
}

/* 装饰性光斑 */
.aifadian-banner::before {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.18);
  pointer-events: none;
}

.aifadian-banner::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.12);
  pointer-events: none;
}

.aifadian-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.aifadian-emoji {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  animation: banner-pulse 2s ease-in-out infinite;
}

@keyframes banner-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

.aifadian-banner-body {
  flex: 1;
  min-width: 0;
}

.aifadian-banner-text {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.7;
  color: #831843;
  letter-spacing: 0.01em;
}

.aifadian-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ec4899, #f59e0b);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.30);
  text-decoration: none;
  word-break: break-all;
}

.aifadian-banner-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.42);
}

.aifadian-link-icon {
  font-size: 1.1rem;
}

.aifadian-arrow {
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.aifadian-banner-link:hover .aifadian-arrow {
  transform: translate(2px, -2px);
}

@media (max-width: 640px) {
  .aifadian-banner {
    padding: 18px 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
  }

  .aifadian-banner-inner {
    gap: 10px;
  }

  .aifadian-emoji {
    font-size: 1.5rem;
  }

  .aifadian-banner-text {
    font-size: 1rem;
  }

  .aifadian-banner-link {
    font-size: 0.85rem;
    padding: 8px 14px;
  }
}

/* ============================================================
   Yzr工坊 — Workshop 首页
   ============================================================ */

/* ── Hero ── */

.workshop-hero {
  text-align: center;
  padding: 48px 0 28px;
}

.workshop-logo {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  object-fit: contain;
  margin-bottom: 28px;
  transition: transform 400ms cubic-bezier(0.25, 0.1, 0.25, 1),
              box-shadow 400ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.workshop-logo:hover {
  transform: scale(1.04);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.workshop-title {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.08;
  color: #020617;
}

.workshop-tagline {
  margin: 18px auto 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.78;
  font-weight: 500;
}

/* ── Section 标题 ── */

.section-heading {
  margin: 0 0 28px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

/* ── 项目卡片网格 ── */

.workshop-projects {
  margin-top: 64px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* ── 项目卡片 ── */

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition: transform 280ms cubic-bezier(0.25, 0.1, 0.25, 1),
              box-shadow 280ms cubic-bezier(0.25, 0.1, 0.25, 1),
              border-color 280ms cubic-bezier(0.25, 0.1, 0.25, 1);
  cursor: pointer;
}

a.project-card {
  color: inherit;
  text-decoration: none;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 64px rgba(15, 23, 42, 0.11);
  border-color: rgba(37, 99, 235, 0.25);
}

/* ── 项目卡片媒体区 ── */

.project-card-media {
  padding: 32px 28px 0;
}

.project-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  object-fit: contain;
}

.project-card-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  border: 1.5px dashed rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

/* ── 项目卡片正文 ── */

.project-card-body {
  padding: 20px 28px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-title {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.project-card-desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.project-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  transition: gap 200ms ease, color 200ms ease;
}

.project-card:hover .project-card-cta {
  gap: 8px;
}

.project-card-cta-muted {
  color: #94a3b8;
  cursor: default;
}

.project-card-soon {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}

.project-card-soon:hover {
  transform: none;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
  border-color: var(--line);
}

/* ── Footer (workshop) ── */

.footer-workshop {
  margin-top: 72px;
}

/* ── 项目卡片响应式 ── */

@media (max-width: 960px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .workshop-hero {
    padding: 28px 0 16px;
  }
}

@media (max-width: 640px) {
  .workshop-logo {
    width: 72px;
    height: 72px;
    border-radius: 22px;
  }

  .workshop-title {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .workshop-tagline {
    font-size: 1.02rem;
  }

  .project-card-media {
    padding: 24px 20px 0;
  }

  .project-card-body {
    padding: 16px 20px 24px;
  }
}
