/*
 * FortiGate SD-WAN 网络健康监控系统 - 自定义样式
 * Custom styles for SEO/GEO optimized landing page
 */

/* ========================================
   CSS Custom Properties (Variables)
   ======================================== */
:root {
  --color-emerald-400: #34d399;
  --color-emerald-500: #10b981;
  --color-emerald-600: #059669;
  --color-sky-400: #38bdf8;
  --color-sky-500: #0ea5e9;
  --color-amber-400: #fbbf24;
  --color-slate-50: #f8fafc;
  --color-slate-200: #e2e8f0;
  --color-slate-600: #475569;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
}

/* ========================================
   Base Styles
   ======================================== */
html {
  scroll-behavior: smooth;
}

/* GPU acceleration for smoother animations */
header {
  transition: transform 0.3s ease, background-color 0.3s ease;
  will-change: transform;
}

header.scrolled {
  background-color: rgba(15, 23, 42, 0.98);
}

/* Content visibility for below-fold content */
section:not(:first-of-type) {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

/* Skip to main content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-emerald-500);
  color: white;
  padding: 8px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ========================================
   Hero Section Styles
   ======================================== */
.hero-gradient {
  background: linear-gradient(135deg, #fff 0%, var(--color-emerald-400) 50%, var(--color-sky-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-emerald-400);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1rem;
}

/* ========================================
   Card Styles
   ======================================== */
.card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-slate-200);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-feature-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--color-slate-200);
}

.arch-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--color-slate-200);
  text-align: center;
}

.arch-step {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--color-emerald-500), var(--color-sky-500));
  color: white;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.tech-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid var(--color-slate-200);
  border-radius: 9999px;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-slate-800);
}

/* ========================================
   FAQ Section Styles (GEO Optimized)
   ======================================== */
.faq-item {
  border-radius: 0.5rem;
  overflow: hidden;
}

.faq-item summary {
  background: white;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.faq-answer {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-answer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
}

/* ========================================
   Table Styles
   ======================================== */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-slate-200);
}

table th {
  background: var(--color-slate-50);
  font-weight: 600;
  color: var(--color-slate-800);
}

table tr:hover {
  background: var(--color-slate-50);
}

/* ========================================
   Mobile Menu Styles
   ======================================== */
.mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(12px);
  padding: 1rem;
  flex-direction: column;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: background 0.2s ease;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   Animation Styles
   ======================================== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in {
  animation: slideIn 0.6s ease forwards;
}

/* Staggered animation for cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   Utility Classes
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  header,
  footer,
  .mobile-menu-btn,
  .mobile-nav {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* ========================================
   Focus Styles (Accessibility)
   ======================================== */
a:focus,
button:focus,
summary:focus {
  outline: 2px solid var(--color-emerald-500);
  outline-offset: 2px;
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   High Contrast Mode
   ======================================== */
@media (prefers-contrast: high) {
  .card,
  .faq-item summary,
  .dashboard-feature-card,
  .arch-card,
  .tech-badge {
    border-width: 2px;
  }
}
