/* ============================================
   Writecho 官网 - 全局样式
   设计：极简 · 现代 · 安静
   主色：深墨黑 #1C1C1E / 浅蓝 #A8D8EA
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-bg: #0A0A0B;
  --color-surface: #1C1C1E;
  --color-surface-hover: #2C2C2E;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-text: #F5F5F7;
  --color-text-secondary: #86868B;
  --color-accent: #A8D8EA;
  --color-accent-dim: rgba(168, 216, 234, 0.12);
  --color-accent-glow: rgba(168, 216, 234, 0.25);
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-width: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 10, 11, 0.72);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav-brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #A8D8EA 0%, #6BB5D1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-brand .logo svg {
  width: 18px;
  height: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
  background: var(--color-accent-dim);
}

.nav-links a.active {
  color: var(--color-accent);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s ease, opacity 0.35s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }
}

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

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, #A8D8EA 0%, #6BB5D1 100%);
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(168, 216, 234, 0.2);
}

.hero-logo svg {
  width: 44px;
  height: 44px;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero h1 span {
  background: linear-gradient(135deg, #A8D8EA 0%, #7EC8E3 50%, #A8D8EA 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

.hero .subtitle-cn {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-bottom: 24px;
  letter-spacing: 0.08em;
}

.hero .tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: #0A0A0B;
  box-shadow: 0 4px 16px rgba(168, 216, 234, 0.25);
}

.btn-primary:hover {
  background: #b8e2f0;
  box-shadow: 0 6px 24px rgba(168, 216, 234, 0.35);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: var(--color-surface-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Section --- */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: rgba(168, 216, 234, 0.15);
  background: var(--color-surface-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-accent);
}

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

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

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

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Platforms Section --- */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.platform-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.platform-card:hover {
  border-color: rgba(168, 216, 234, 0.15);
  transform: translateY(-2px);
}

.platform-card.available {
  border-color: rgba(168, 216, 234, 0.2);
}

.platform-card.available::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
}

.platform-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--color-accent);
}

.platform-icon svg {
  width: 100%;
  height: 100%;
}

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

.platform-card .status {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
}

.platform-card .status.ready {
  background: var(--color-accent-dim);
  color: var(--color-accent);
}

.platform-card .status.dev {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .platforms-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 400px) {
  .platforms-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Download Page --- */
.download-hero {
  padding: 140px 24px 60px;
  text-align: center;
}

.download-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.download-hero p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.download-hero .version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-accent-dim);
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 40px;
}

.download-primary {
  max-width: 560px;
  margin: 0 auto 60px;
}

.download-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
}

.download-card .platform-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
}

.download-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.download-card .desc {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.download-card .btn {
  width: 100%;
  justify-content: center;
  padding: 16px 28px;
  font-size: 1rem;
}

.coming-soon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.coming-soon-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  opacity: 0.7;
}

.coming-soon-card .platform-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}

.coming-soon-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.coming-soon-card .status {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}

@media (max-width: 640px) {
  .coming-soon-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* --- Contact Section --- */
.contact-section {
  text-align: center;
  padding: 60px 0;
}

.contact-section p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.contact-section a {
  color: var(--color-accent);
  font-weight: 500;
  transition: opacity var(--transition);
}

.contact-section a:hover {
  opacity: 0.8;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-brand .logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #A8D8EA 0%, #6BB5D1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-brand .logo svg {
  width: 14px;
  height: 14px;
}

.footer-copy {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  transition: color var(--transition);
}

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

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.7s ease forwards;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.12s; }
.animate-in:nth-child(3) { animation-delay: 0.19s; }
.animate-in:nth-child(4) { animation-delay: 0.26s; }

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

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

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}
