/* CalCel 官网样式 */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-border: #e2e8f0;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 64px;
  --container: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a:hover {
  color: var(--color-primary-dark);
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo-brand {
  display: block;
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 28px;
  flex: 1;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-cta {
  margin-left: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Buttons */
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-align: center;
}

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

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff !important;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff !important;
}

.btn-secondary {
  background: #475569;
  color: #fff !important;
  border-color: #475569;
}

.btn-secondary:hover {
  background: #334155;
  color: #fff !important;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary) !important;
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary-light);
}

.btn-label {
  line-height: 1.3;
}

.btn-hint {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.85;
}

/* Hero */
.hero {
  padding: 72px 0 88px;
  background: linear-gradient(160deg, #eff6ff 0%, #f8fafc 45%, #fff 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.hero-desc {
  margin: 0 0 32px;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 520px;
}

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

.hero-actions .btn {
  flex-direction: row;
}

/* Mockup */
.mockup {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #fff;
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--color-border);
}

.mockup-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.mockup-bar .dot:nth-child(1) { background: #f87171; }
.mockup-bar .dot:nth-child(2) { background: #fbbf24; }
.mockup-bar .dot:nth-child(3) { background: #4ade80; }

.mockup-title {
  margin-left: 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.mockup-body {
  padding: 0;
}

.mockup-menu {
  padding: 8px 16px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  background: #fafbfc;
}

.mockup-toolbar {
  height: 36px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
  border-bottom: 1px solid var(--color-border);
}

.mockup-sheet {
  height: 220px;
  padding: 16px;
  background: #fff;
}

.mockup-grid {
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(#e2e8f0 1px, transparent 1px),
    linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
  background-size: 48px 28px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.mockup-tabs {
  padding: 8px 16px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  background: #f8fafc;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* Feature list */
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-item {
  padding: 28px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.feature-item h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.feature-item p {
  margin: 0;
  font-size: 0.925rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

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

.card {
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--color-primary);
}

.card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Demo */
.demo-box {
  text-align: center;
  padding: 56px 40px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e40af 100%);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.demo-box h2 {
  margin: 0 0 12px;
  font-size: 1.75rem;
}

.demo-box > p {
  margin: 0 0 32px;
  opacity: 0.9;
}

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

.demo-actions .btn-primary {
  background: #fff;
  color: var(--color-primary) !important;
  border-color: #fff;
}

.demo-actions .btn-primary:hover {
  background: #f1f5f9;
}

.demo-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff !important;
}

.demo-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.demo-actions .btn-outline {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.6);
}

.demo-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Contact */
.contact-box {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.contact-box h2 {
  margin: 0 0 12px;
  font-size: 2rem;
}

.contact-box > p {
  margin: 0 0 32px;
  color: var(--color-text-muted);
}

.contact-items {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* Footer */
.footer {
  padding: 32px 0;
  background: #0f172a;
  color: #94a3b8;
}

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

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-icon {
  display: block;
  flex-shrink: 0;
}

.footer-logo {
  font-weight: 700;
  color: #fff;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.footer-icp {
  color: #94a3b8;
  font-size: 0.875rem;
}

.footer-icp:hover {
  color: #cbd5e1;
}

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

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

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 20px;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-cta {
    display: none;
  }

  .header .nav {
    position: relative;
    flex-wrap: wrap;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

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

  .demo-box {
    padding: 40px 24px;
  }

  .demo-actions {
    flex-direction: column;
  }

  .demo-actions .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-meta {
    align-items: center;
  }
}
