/* ============================================================
   LocalSnapVault / 私影库 — 品牌官网样式
   Copyright (c) 2026 lmj. All rights reserved.
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --brand: #18A058;
  --brand-light: #36C278;
  --brand-dark: #0F7A42;
  --accent: #2080F0;
  --accent-light: #4098FF;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #253349;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --border-light: #475569;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --header-height: 72px;
  --font-sans: 'Noto Sans SC', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

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

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

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

/* ---------- Utilities ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--brand);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  text-align: center;
}

.text-center {
  text-align: center;
}

/* scroll animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ---------- Header / Nav ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo span {
  color: var(--brand);
}

.logo-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}

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

.nav a {
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.nav a.cta-nav {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.nav a.cta-nav:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--header-height);
}

/* 背景装饰 */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg .gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.hero-bg .sphere-1 {
  width: 600px;
  height: 600px;
  background: var(--brand);
  top: -15%;
  right: -10%;
  animation: float 12s ease-in-out infinite;
}

.hero-bg .sphere-2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -10%;
  left: -5%;
  animation: float 16s ease-in-out infinite reverse;
}

.hero-bg .sphere-3 {
  width: 300px;
  height: 300px;
  background: var(--brand);
  bottom: 30%;
  right: 20%;
  animation: float 14s ease-in-out infinite 2s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.05); }
}

/* 网格背景 */
.hero-bg .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.15;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(24, 160, 88, 0.1);
  border: 1px solid rgba(24, 160, 88, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--brand-light);
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 8px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero .hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.8;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 160, 88, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}

/* Hero 右侧 Logo 大图 */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 420px;
}

.hero-logo {
  width: 100%;
  max-width: 320px;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 0 60px rgba(24, 160, 88, 0.15));
}

.hero-download-alt {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-download-alt a {
  color: var(--accent-light);
}

.hero-download-alt code {
  background: rgba(24, 160, 88, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--brand-light);
}

/* ---------- Features ---------- */
#features {
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
  cursor: default;
}

.feature-card:hover {
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(24, 160, 88, 0.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.feature-icon.green { background: rgba(24, 160, 88, 0.12); color: var(--brand); }
.feature-icon.blue { background: rgba(32, 128, 240, 0.12); color: var(--accent); }
.feature-icon.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.feature-icon.orange { background: rgba(251, 146, 60, 0.12); color: #fb923c; }
.feature-icon.red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.feature-icon.teal { background: rgba(20, 184, 166, 0.12); color: #14b8a6; }

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

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

/* ---------- Tech Stack ---------- */
#tech {
  background: var(--bg-primary);
}

.tech-intro {
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

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

.tech-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
}

.tech-card:hover {
  border-color: rgba(24, 160, 88, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.tech-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.tech-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.tech-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Tag cloud */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}

.tech-tag {
  padding: 8px 20px;
  border-radius: 100px;
  background: rgba(24, 160, 88, 0.08);
  border: 1px solid rgba(24, 160, 88, 0.2);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brand-light);
  transition: all var(--transition);
}

.tech-tag:hover {
  background: rgba(24, 160, 88, 0.15);
  border-color: var(--brand);
  transform: translateY(-2px);
}

/* ---------- Preview ---------- */
#preview {
  background: var(--bg-secondary);
}

.preview-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.preview-text {
  flex: 1;
  max-width: 480px;
}

.preview-text h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.preview-text p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.8;
}

.preview-text .preview-list {
  list-style: none;
}

.preview-text .preview-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.preview-text .preview-list li::before {
  content: '✓';
  color: var(--brand);
  font-weight: 700;
  font-size: 1.1rem;
}

.preview-mockup {
  flex: 1.2;
  position: relative;
}

.mockup-frame {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  line-height: 0;
}

.mockup-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 4px 0;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-bottom .social-links {
  display: flex;
  gap: 16px;
}

.footer-bottom .social-links a {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color var(--transition);
}

.footer-bottom .social-links a:hover {
  color: var(--brand);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero h1 { font-size: 2.8rem; }
  .section-title { font-size: 2rem; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .preview-content { flex-direction: column; }
  .preview-text { max-width: 100%; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
  }
  .menu-toggle { display: flex; }

  .hero .container { flex-direction: column-reverse; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero .hero-desc { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero h1 { font-size: 2.2rem; }
  .hero-visual { max-width: 240px; }
  .hero-logo { max-width: 180px; }

  .section { padding: 60px 0; }
  .section-title { font-size: 1.6rem; }
  .features-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero .hero-subtitle { font-size: 1rem; }
  .btn { padding: 12px 24px; font-size: 0.9rem; }
}
