/* ══════════════════════════════════════════════
   P盾 · 共用样式表
   ══════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --color-primary: #1e3a8a;
  --color-accent: #06b6d4;
  --color-accent-light: #34d399;
  --color-dark-start: #0f172a;
  --color-dark-end: #1e293b;
  --color-light-start: #ffffff;
  --color-light-end: #f8fafc;
  --color-title: #0f172a;
  --color-subtitle: #64748b;
}

/* ── Smooth Scroll ── */
html { scroll-behavior: smooth; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-dark-start); }
::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 3px; }

/* ── Hero Particles Canvas ── */
#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Glowing gradient text ── */
.text-gradient {
  background: linear-gradient(135deg, #06b6d4 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glow buttons ── */
.btn-glow {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.btn-glow::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px;
  right: -2px; bottom: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #06b6d4, #34d399, #06b6d4);
  background-size: 300% 300%;
  animation: gradientBorder 3s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-glow:hover::before { opacity: 1; }
.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(6, 182, 212, 0.35);
}

@keyframes gradientBorder {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Gradient flow for accent elements ── */
.gradient-flow {
  background: linear-gradient(135deg, #06b6d4, #34d399, #06b6d4);
  background-size: 300% 300%;
  animation: gradientFlow 4s ease infinite;
}
@keyframes gradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Animated gradient text (for title) ── */
.animate-gradient {
  background: linear-gradient(135deg, #06b6d4, #34d399, #06b6d4);
  background-size: 200% auto;
  animation: gradientShift 3s ease infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Type cursor ── */
.cursor-blink::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
  color: #06b6d4;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── 3D Tilt Cards ── */
.tilt-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  perspective: 800px;
}

/* ── Floating shield ── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}
.float-anim { animation: float 4s ease-in-out infinite; }

/* ── Pulse ring ── */
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
  70%  { box-shadow: 0 0 0 20px rgba(6, 182, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}
.pulse-ring { animation: pulseRing 2s infinite; }

/* ── Scroll progress indicator ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #34d399);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ── Back to top ── */
#back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #34d399);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}
#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.5);
}

/* ── Navbar ── */
.navbar {
  transition: all 0.4s ease;
}
.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

/* ── FAQ Accordion ── */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}
.faq-answer.open {
  max-height: 300px;
  opacity: 1;
}
.faq-toggle .faq-icon {
  transition: transform 0.3s ease;
}
.faq-toggle.open .faq-icon {
  transform: rotate(45deg);
}

/* ── Testimonial Carousel ── */
.testimonial-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Mobile hamburger ── */
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Particle dots background (CSS fallback) ── */
.hero-grid-bg {
  background-image: radial-gradient(rgba(6, 182, 212, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Number counter ── */
.counter-value {
  display: inline-block;
}

/* ── Inner page banner ── */
.page-banner {
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(6, 182, 212, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ── About page team cards ── */
.team-card {
  transition: all 0.4s ease;
}
.team-card:hover {
  transform: translateY(-8px);
}

/* ── Contact form ── */
.contact-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  transition: all 0.3s ease;
}
.contact-input:focus {
  border-color: #06b6d4;
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}
.contact-input::placeholder {
  color: #64748b;
}

/* ── Active nav link ── */
.nav-link.active {
  color: #22d3ee;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .mobile-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    padding: 80px 32px 32px;
  }
  .mobile-menu.open { right: 0; }
  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 49;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-overlay.open { opacity: 1; pointer-events: auto; }
  .page-banner { padding: 100px 0 60px; }
}

/* ── Z-Blog Article Content (prose) ── */
.prose { max-width: 65ch; color: #cbd5e1; font-size: 1rem; line-height: 1.75; }
.prose h2 { font-size: 1.5rem; font-weight: 700; color: #fff; margin-top: 2em; margin-bottom: 0.8em; }
.prose h3 { font-size: 1.25rem; font-weight: 600; color: #e2e8f0; margin-top: 1.5em; margin-bottom: 0.6em; }
.prose p { margin-bottom: 1.2em; }
.prose a { color: #22d3ee; text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: #34d399; }
.prose ul, .prose ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.prose li { margin-bottom: 0.3em; }
.prose blockquote { border-left: 3px solid #06b6d4; padding-left: 1em; color: #94a3b8; font-style: italic; margin: 1.5em 0; }
.prose img { border-radius: 8px; max-width: 100%; height: auto; margin: 1.5em 0; }
.prose code { background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; font-size: 0.875em; color: #34d399; }
.prose pre { background: rgba(0,0,0,0.3); padding: 1em; border-radius: 8px; overflow-x: auto; margin: 1.5em 0; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid rgba(255,255,255,0.1); text-align: left; }
.prose th { background: rgba(255,255,255,0.05); font-weight: 600; color: #e2e8f0; }
.prose hr { border-color: rgba(255,255,255,0.08); margin: 2em 0; }

/* ── Pagination ── */
.pagebar a, .pagebar span { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; font-size: 14px; transition: all 0.2s; }
.pagebar a { color: #94a3b8; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); text-decoration: none; }
.pagebar a:hover { color: #22d3ee; border-color: #22d3ee; background: rgba(6,182,212,0.1); }
.pagebar span.now-page { color: #fff; background: linear-gradient(135deg, #06b6d4, #34d399); border: none; }
.pagebar .now-page, .pagebar .current { color: #fff; background: linear-gradient(135deg, #06b6d4, #34d399); border: none; }

/* ── Line clamp ── */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Override sm:px-8 padding for stats section */
@media (min-width: 640px) {
    #stats {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}
