/* ============================================================
   MailNest · 公共邮箱服务 落地页样式
   ============================================================ */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --accent: #06b6d4;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --amber: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .1);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .08), 0 2px 4px -2px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, .1), 0 8px 10px -6px rgba(15, 23, 42, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html { scroll-behavior: smooth; }

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

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section[id] { scroll-margin-top: 84px; }

img, svg { vertical-align: middle; }

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

/* ============ 通用按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(99, 102, 241, .5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(99, 102, 241, .6);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); }

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

.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-sm { padding: 8px 16px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ============ 导航栏 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .3px;
}
.brand-icon {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--primary); }

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

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.lang-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* 汉堡菜单（移动端） */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .25s ease, opacity .25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.mobile-menu.open { display: flex; }
.mobile-menu > a:not(.btn) {
  padding: 12px 8px;
  color: var(--text-muted);
  font-weight: 500;
  border-radius: 10px;
}
.mobile-menu > a:not(.btn):hover { color: var(--primary); background: #f1f5f9; }
.mobile-menu .btn { margin-top: 8px; }

/* ============ Hero 区 ============ */
.hero {
  position: relative;
  padding: 96px 0 88px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  pointer-events: none;
}
.hero::before {
  width: 480px;
  height: 480px;
  top: -160px;
  left: -140px;
  background: radial-gradient(circle, rgba(99, 102, 241, .45), transparent 70%);
}
.hero::after {
  width: 520px;
  height: 520px;
  bottom: -200px;
  right: -160px;
  background: radial-gradient(circle, rgba(6, 182, 212, .4), transparent 70%);
}
.hero .container { position: relative; z-index: 1; }

.beta-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .4px;
  box-shadow: 0 8px 20px -6px rgba(249, 115, 22, .55);
  margin-bottom: 28px;
}
.badge-small { padding: 7px 16px; font-size: .8rem; margin-bottom: 20px; }

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.72); }
}

.hero-title {
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.5px;
  max-width: 760px;
  margin: 0 auto 20px;
}
.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 110px;
}
.stat strong {
  font-size: 2.1rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat span { font-size: .9rem; color: var(--text-muted); }

/* ============ 通用 section ============ */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 52px;
}
.section-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.4px;
  margin-bottom: 12px;
}
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ============ 功能亮点 ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #c7d2fe;
}
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  color: #fff;
  margin-bottom: 20px;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card:nth-child(3n+1) .feature-icon { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.feature-card:nth-child(3n+2) .feature-icon { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.feature-card:nth-child(3n+3) .feature-icon { background: linear-gradient(135deg, #f59e0b, #f97316); }

.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: .95rem; }

/* ============ 使用流程 ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 18px;
  box-shadow: 0 8px 18px -6px rgba(99, 102, 241, .5);
}
.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: .93rem; }

/* ============ 申请邀请 ============ */
.invite-card {
  max-width: 660px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 52px 48px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.invite-card h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.4px;
  margin-bottom: 12px;
}
.invite-sub { color: var(--text-muted); margin-bottom: 32px; }

.invite-form { text-align: left; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #94a3b8; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}
.form-group input.invalid { border-color: var(--danger); }
.form-group input.invalid:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, .12); }

.field-error {
  min-height: 1.2em;
  margin-top: 6px;
  font-size: .85rem;
  color: var(--danger);
}

.invite-form .btn { margin-top: 6px; }

.invite-success {
  margin-top: 28px;
  padding: 28px 20px;
  border-radius: var(--radius);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  text-align: center;
}
.invite-success svg { width: 44px; height: 44px; color: var(--success); margin-bottom: 10px; }
.invite-success h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.invite-success p { color: #047857; font-size: .95rem; }

.invite-note {
  margin-top: 22px;
  font-size: .8rem;
  color: #94a3b8;
}

/* ============ 页脚 ============ */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 44px 0;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 12px;
}
.footer-brand .brand-icon { color: var(--accent); width: 20px; height: 20px; }
.footer-demo { font-size: .85rem; margin-bottom: 10px; max-width: 560px; margin-left: auto; margin-right: auto; }
.footer-copy { font-size: .8rem; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .nav { height: 64px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 72px 0 64px; }
  .hero-actions { flex-direction: column; align-items: stretch; margin-bottom: 44px; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 24px; }
  .stat { min-width: 80px; }
  .stat strong { font-size: 1.7rem; }

  .section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }

  .invite-card { padding: 36px 24px; border-radius: 18px; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .hero-stats { gap: 16px; }
}
