/* site.css?v=10 — 众智化工 "Crystalline Industrial" refined */
/* Design: Geist + DM Sans, geometric precision, lattice textures, premium image treatment */

/* ===== Keyframes ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 141, 94, 0.5); }
  50% { box-shadow: 0 0 0 14px rgba(26, 141, 94, 0); }
}
@keyframes hexDrift {
  0% { background-position: 0 0; }
  100% { background-position: 60px 104px; }
}
@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-1%, -1%); }
  30% { transform: translate(1%, 2%); }
  50% { transform: translate(-2%, 1%); }
  70% { transform: translate(2%, -2%); }
  90% { transform: translate(-1%, 2%); }
}

/* ===== Scroll-triggered stagger animation system ===== */
/* Default: always visible (opacity:1). Animation uses fill-mode:both so during
   stagger delay the element hides (takes "from" keyframe), then fades in.
   If JS fails entirely, elements stay at opacity:1 — no white screen. */
.animate-stagger > * { opacity: 1; }
.animate-stagger.in-view > * {
  animation: fadeInUp 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.animate-stagger.in-view > *:nth-child(1) { animation-delay: 0s; }
.animate-stagger.in-view > *:nth-child(2) { animation-delay: 0.07s; }
.animate-stagger.in-view > *:nth-child(3) { animation-delay: 0.14s; }
.animate-stagger.in-view > *:nth-child(4) { animation-delay: 0.21s; }
.animate-stagger.in-view > *:nth-child(5) { animation-delay: 0.28s; }
.animate-stagger.in-view > *:nth-child(6) { animation-delay: 0.35s; }
.animate-stagger.in-view > *:nth-child(7) { animation-delay: 0.42s; }
.animate-stagger.in-view > *:nth-child(8) { animation-delay: 0.49s; }
.animate-stagger.in-view > *:nth-child(9) { animation-delay: 0.56s; }
.animate-stagger.in-view > *:nth-child(10) { animation-delay: 0.63s; }
.animate-stagger.in-view > *:nth-child(11) { animation-delay: 0.70s; }
.animate-stagger.in-view > *:nth-child(12) { animation-delay: 0.77s; }

.animate-reveal-right { opacity: 1; }
.animate-reveal-right.in-view { animation: fadeInRight 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.animate-reveal-left { opacity: 1; }
.animate-reveal-left.in-view { animation: fadeInLeft 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.animate-reveal-scale { opacity: 1; }
.animate-reveal-scale.in-view { animation: scaleIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

/* Respect reduced-motion preference: skip animation, stay visible */
@media (prefers-reduced-motion: reduce) {
  .animate-stagger.in-view > *,
  .animate-reveal-right.in-view,
  .animate-reveal-left.in-view,
  .animate-reveal-scale.in-view {
    animation: none;
  }
}

.float-ask-pulse { animation: pulseGreen 2.2s ease-in-out infinite; }

/* ===== Hexagonal lattice pattern ===== */
.bg-lattice {
  background-image:
    url("data:image/svg+xml,%3Csvg width='60' height='104' viewBox='0 0 60 104' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 17.5v35L30 70 0 52.5v-35L30 0z' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='0.8'/%3E%3Cpath d='M30 34.67L60 52.17v34.66L30 104 0 86.83V52.17L30 34.67z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='0.8'/%3E%3C/svg%3E");
  background-size: 60px 104px;
}
.bg-lattice-animate { animation: hexDrift 40s linear infinite; }

/* ===== Grain texture overlay ===== */
.bg-grain::after {
  content: ""; position: absolute; inset: 0; opacity: 0.04; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
/* grain animation — subtle drift for depth */
.bg-grain::after { animation: grainShift 8s ease-in-out infinite; }

.geo-accent { display: inline-block; width: 8px; height: 8px; border: 1.5px solid currentColor; transform: rotate(45deg); flex-shrink: 0; }

/* ===== IMAGE TREATMENT SYSTEM (frontend-design-3 refined) ===== */

/* 1. Vignette — dark radial gradient overlay for depth */
.img-vignette { position: relative; }
.img-vignette::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.25) 100%);
  z-index: 2; transition: opacity 0.4s ease;
}
.img-vignette:hover::after { opacity: 0.5; }

/* 2. Hover pop — subtle contrast + saturation lift */
.img-hover-pop { transition: filter 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1); }
.img-hover-pop:hover { filter: contrast(1.08) saturate(1.12); }

/* 3. Geo corner accent — tiny rotated square in top-right */
.img-geo-frame { position: relative; }
.img-geo-frame::before {
  content: ""; position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 10px; height: 10px; border: 2px solid rgba(255,255,255,0.7);
  transform: rotate(45deg); pointer-events: none;
  transition: border-color 0.3s, transform 0.4s;
}
.img-geo-frame:hover::before { border-color: #1fa870; transform: rotate(135deg); }

/* 4. Diagonal grain stripe for factory images */
.img-grain-stripe { position: relative; }
.img-grain-stripe::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(135deg, rgba(11,58,102,0.12) 0%, transparent 40%, transparent 60%, rgba(11,58,102,0.08) 100%);
  opacity: 0; transition: opacity 0.4s ease;
}
.img-grain-stripe:hover::after { opacity: 1; }

/* 5. Subtle shadow lift for cert/badge images */
.img-badge-lift {
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}
.img-badge-lift:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(11,58,102,0.12), 0 3px 8px rgba(0,0,0,0.06); }

/* 6. Exposure reveal — gradient fade from bottom */
.img-exposure {
  position: relative; overflow: hidden;
}
.img-exposure::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 30%;
  background: linear-gradient(to top, rgba(255,255,255,0.15) 0%, transparent 100%);
  pointer-events: none; z-index: 2; opacity: 0;
  transition: opacity 0.4s ease;
}
.img-exposure:hover::after { opacity: 1; }

/* ===== Spec table ===== */
.th-slash { position: relative; min-width: 100px; height: 48px; overflow: hidden; }
.th-slash .tl-top { position: absolute; right: 8px; top: 5px; font-size: 0.78rem; font-weight: 700; }
.th-slash .tl-bot { position: absolute; left: 10px; bottom: 5px; font-size: 0.78rem; font-weight: 700; }
.th-slash::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom right, transparent calc(50% - 0.5px), rgba(209, 213, 219, 0.6) calc(50% - 0.5px), rgba(209, 213, 219, 0.6) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  pointer-events: none; }

/* ===== Rich content ===== */
.rich-content h1 { font-size: 1.5rem; font-weight: 800; color: #0a2240; margin: 1.5rem 0 0.75rem; font-family: 'Geist', sans-serif; }
.rich-content h2 { font-size: 1.25rem; font-weight: 700; color: #0a2240; margin: 1.25rem 0 0.5rem; font-family: 'Geist', sans-serif; }
.rich-content h3 { font-size: 1.1rem; font-weight: 600; color: #1e293b; margin: 1rem 0 0.5rem; font-family: 'Geist', sans-serif; }
.rich-content p { color: #475569; line-height: 1.8; margin-bottom: 0.75rem; }
.rich-content ul, .rich-content ol { color: #475569; padding-left: 1.25rem; margin-bottom: 0.75rem; }
.rich-content li { margin-bottom: 0.25rem; }
.rich-content table { width: 100%; border-collapse: collapse; border: 1px solid #e7e5e4; margin: 1rem 0; }
.rich-content th { background: #fafaf9; padding: 0.5rem 0.75rem; text-align: left; font-size: 0.875rem; font-weight: 600; border: 1px solid #e7e5e4; }
.rich-content td { padding: 0.5rem 0.75rem; font-size: 0.875rem; border: 1px solid #e7e5e4; }
.rich-content img { max-width: 100%; height: auto; border-radius: 0.25rem; margin: 0.5rem 0; }
.rich-content a { color: #1A8D5E; text-decoration: underline; }

.img-placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e7e5e4, #d6d3d1); color: #a8a29e; font-size: 2rem; font-weight: 700; aspect-ratio: 1; border-radius: 0.25rem; }
.img-placeholder.large { aspect-ratio: 4/3; font-size: 3rem; }

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.spec-table tbody tr:nth-child(odd) { background: #fafaf9; }
.spec-table tbody tr:nth-child(even) { background: #fff; }

[data-accordion] button[aria-expanded="true"] { color: #0a2240; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fafaf9; }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a29e; }
