/* ============================================================
   MeloAI造音 官网样式
   设计基准来自 App 内 lib/core/theme/app_colors.dart
   ============================================================ */

:root {
  --bg: #0e0f13;
  --bg-elevated: #16181e;
  --card: #1a1c22;
  --surface: #22242c;
  --surface-light: #2c2f38;
  --divider: rgba(255, 255, 255, 0.08);

  --primary: #3dfc8f;
  --gradient-start: #7df5c3;
  --gradient-end: #c9b8ff;
  --accent-purple: #8b7cf6;
  --pro: #f5d767;

  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.35);
  --on-gradient: #0b2e1d;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --container-w: 1120px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", "Segoe UI",
    system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  border: none;
  cursor: pointer;
}

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

.btn--gradient {
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  color: var(--on-gradient);
  box-shadow: 0 8px 24px rgba(61, 252, 143, 0.25);
}

.btn--gradient:hover {
  box-shadow: 0 10px 30px rgba(61, 252, 143, 0.4);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--divider);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--small {
  height: 38px;
  padding: 0 20px;
  font-size: 14px;
}

.btn--large {
  height: 52px;
  padding: 0 28px;
  font-size: 16px;
}

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease, height 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  height: 64px;
  background: rgba(14, 15, 19, 0.8);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--divider);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 15px;
  color: var(--text-secondary);
}

.nav__links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  transition: width 0.25s ease;
}

.nav__links a:hover::after {
  width: 100%;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 140px 0 80px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center right;
  opacity: 0.55;
  filter: saturate(1.1);
  mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

.hero__bg--dim {
  opacity: 0.28;
  mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.35;
  z-index: 0;
}

.hero__glow--1 {
  width: 480px;
  height: 480px;
  background: var(--gradient-start);
  top: -120px;
  left: -140px;
}

.hero__glow--2 {
  width: 520px;
  height: 520px;
  background: var(--gradient-end);
  bottom: -160px;
  right: -160px;
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin-bottom: 28px;
  box-shadow: 0 0 60px rgba(61, 252, 143, 0.25);
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero__title {
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.5px;
  max-width: 780px;
}

.hero__desc {
  margin: 24px 0 36px;
  max-width: 620px;
  color: var(--text-secondary);
  font-size: 16px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero__meta {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 2px solid var(--divider);
  border-radius: var(--radius-full);
  z-index: 1;
}

.hero__scroll span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: var(--radius-full);
  background: var(--primary);
  animation: scrollDown 1.8s ease infinite;
}

@keyframes scrollDown {
  0% { opacity: 1; top: 6px; }
  70% { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 6px; }
}

/* ============ Section common ============ */
.section {
  position: relative;
  padding: 120px 0;
}

.section--alt {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
  overflow: hidden;
}

.section__tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  text-align: center;
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

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

/* ============ Features ============ */
.feature-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-l);
  padding: 32px 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(61, 252, 143, 0.35);
  background: var(--surface);
}

.feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(125, 245, 195, 0.18), rgba(201, 184, 255, 0.18));
  transition: transform 0.25s ease;
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
}

.feature-card:hover .feature-card__icon {
  transform: scale(1.08) rotate(-4deg);
}

.feature-card__icon--bolt,
.feature-card__icon--chat {
  color: var(--gradient-start);
}

.feature-card__icon--note,
.feature-card__icon--mic {
  color: var(--accent-purple);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============ Showcase ============ */
.cover-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.cover-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-m);
  border: 1px solid var(--divider);
  transition: transform 0.3s ease;
}

.cover-grid img:hover {
  transform: scale(1.05);
}

.pill-row {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--divider);
  font-size: 13px;
  color: var(--text-secondary);
}

.pill--pro {
  color: var(--pro);
  border-color: rgba(245, 215, 103, 0.35);
  background: rgba(245, 215, 103, 0.08);
}

/* ============ Download ============ */
.download {
  text-align: center;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(139, 124, 246, 0.18), transparent);
}

.download__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(61, 252, 143, 0.12), transparent 60%);
  pointer-events: none;
}

.download__inner {
  position: relative;
  z-index: 1;
}

.download__logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin: 0 auto 24px;
}

.download__panel {
  margin: 56px auto 0;
  max-width: 640px;
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
  text-align: left;
}

.download__qr {
  flex: none;
  width: 148px;
  height: 148px;
  background: #fff;
  border-radius: var(--radius-m);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download__qr svg {
  width: 100%;
  height: 100%;
}

.download__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.download__meta-list {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.download__meta-list code {
  background: var(--surface);
  padding: 2px 8px;
  border-radius: var(--radius-s);
  color: var(--text);
  font-size: 12px;
}

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--divider);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.footer__brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.footer__copy {
  font-size: 12px;
  color: var(--text-tertiary);
  max-width: 640px;
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cover-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .download__panel {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .download__info {
    align-items: center;
  }
}

@media (max-width: 680px) {
  .nav__links {
    display: none;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .section {
    padding: 80px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .cover-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }
}
