/* ========================================
   CSS VARIABLES — ~30 Color Variations
   ======================================== */
:root {
  --c1: #020617;
  --c2: #0f172a;
  --c3: #1e293b;
  --c4: #334155;
  --c5: #475569;
  --c6: #64748b;
  --c7: #94a3b8;
  --c8: #cbd5e1;
  --c9: #e2e8f0;
  --c10: #f1f5f9;
  --c11: #ffffff;
  --c12: #0ea5e9;
  --c13: #38bdf8;
  --c14: #7dd3fc;
  --c15: #bae6fd;
  --c16: #0284c7;
  --c17: #0369a1;
  --c18: #06b6d4;
  --c19: #22d3ee;
  --c20: #67e8f9;
  --c21: #6366f1;
  --c22: #818cf8;
  --c23: #a5b4fc;
  --c24: #8b5cf6;
  --c25: #a78bfa;
  --c26: #10b981;
  --c27: #34d399;
  --c28: #f59e0b;
  --c29: #fbbf24;
  --c30: #ef4444;
  --glass-bg: rgba(15, 23, 42, 0.55);
  --glass-border: rgba(148, 163, 184, 0.15);
  --glass-blur: 18px;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius: 16px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  background: var(--c1);
  color: var(--c9);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: var(--c13); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus-visible { color: var(--c19); }
img, svg { max-width: 100%; display: block; }
ul { list-style: none; }
h1, h2, h3, h4 { color: var(--c11); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin: 1.5rem 0 0.75rem; color: var(--c14); }
p { margin-bottom: 1rem; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Focus states */
:focus-visible {
  outline: 2px solid var(--c19);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ========================================
   PROGRESS BAR
   ======================================== */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 9999;
  background: linear-gradient(90deg, var(--c12), var(--c19), var(--c24));
  width: 0%; transition: width 0.1s linear;
}

/* ========================================
   GLASSMORPHISM PANELS
   ======================================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ========================================
   PARTICLES CANVAS
   ======================================== */
#particles-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ========================================
   MORPHING BACKGROUND SHAPES
   ======================================== */
.morph-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; overflow: hidden;
}
.morph-shape {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.18;
}
.shape-1 {
  width: 600px; height: 600px; top: -10%; left: -10%;
  background: radial-gradient(circle, var(--c12), transparent 70%);
  animation: morphFloat1 20s ease-in-out infinite;
}
.shape-2 {
  width: 500px; height: 500px; bottom: 10%; right: -5%;
  background: radial-gradient(circle, var(--c24), transparent 70%);
  animation: morphFloat2 25s ease-in-out infinite;
}
.shape-3 {
  width: 400px; height: 400px; top: 40%; left: 50%;
  background: radial-gradient(circle, var(--c18), transparent 70%);
  animation: morphFloat3 18s ease-in-out infinite;
}
@keyframes morphFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); border-radius: 50%; }
  33% { transform: translate(80px, 60px) scale(1.15); border-radius: 40% 60% 55% 45%; }
  66% { transform: translate(-40px, 100px) scale(0.9); border-radius: 60% 40% 45% 55%; }
}
@keyframes morphFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, -80px) scale(1.2); border-radius: 45% 55% 60% 40%; }
}
@keyframes morphFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -60px) scale(1.1); border-radius: 55% 45% 40% 60%; }
}

/* ========================================
   HEADER / NAV
   ======================================== */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 0.75rem 1.25rem;
  transition: background var(--transition);
}
.nav-container {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1.5rem;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 800; font-size: 1.25rem; color: var(--c11);
}
.logo-svg { color: var(--c13); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: var(--c8); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--c19); }
.nav-cta {
  background: linear-gradient(135deg, var(--c12), var(--c16));
  color: var(--c11) !important; padding: 0.45rem 1.1rem;
  border-radius: 8px; font-weight: 600;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.3);
  transition: box-shadow var(--transition), transform var(--transition);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 0 25px rgba(14, 165, 233, 0.5); }

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 7rem 1.25rem 4rem; gap: 3rem; flex-wrap: wrap;
  perspective: 1200px;
}
.hero-content {
  flex: 1 1 480px; max-width: 600px; padding: 2.5rem;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
}
.logo-container {
  display: inline-block; margin-bottom: 1.5rem;
  animation: floatLogo 6s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.4));
}
.hero-logo { width: 90px; height: 90px; }
@keyframes floatLogo {
  0%, 100% { transform: translateY(0) rotateY(0deg); }
  50% { transform: translateY(-12px) rotateY(8deg); }
}
.hero-sub {
  font-size: 1.1rem; color: var(--c14); font-weight: 600;
  margin-bottom: 1rem; letter-spacing: 0.02em;
}
.hero-intro { font-size: 1.05rem; color: var(--c7); margin-bottom: 2rem; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.75rem; border-radius: 10px; font-weight: 700;
  font-size: 1rem; cursor: pointer; transition: all var(--transition);
  border: none; text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--c12), var(--c21));
  color: var(--c11);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.5);
  color: var(--c11);
}
.btn-outline {
  background: transparent; color: var(--c13);
  border: 2px solid var(--c12);
}
.btn-outline:hover {
  background: rgba(14, 165, 233, 0.1);
  color: var(--c19); transform: translateY(-2px);
}

/* Hero Visual — 3D Ice Machine */
.hero-visual {
  flex: 1 1 320px; max-width: 400px;
  display: flex; align-items: center; justify-content: center;
  perspective: 800px;
}
.ice-machine-3d {
  position: relative; width: 260px; height: 360px;
  transform-style: preserve-3d;
  animation: machineFloat 8s ease-in-out infinite;
}
@keyframes machineFloat {
  0%, 100% { transform: rotateX(5deg) rotateY(-8deg) translateY(0); }
  50% { transform: rotateX(2deg) rotateY(5deg) translateY(-15px); }
}
.machine-body {
  position: absolute; width: 100%; height: 100%;
  transform-style: preserve-3d;
}
.machine-top {
  position: absolute; top: 0; left: 0; width: 100%; height: 40px;
  background: linear-gradient(180deg, var(--c4), var(--c3));
  border-radius: 12px 12px 0 0;
  transform: rotateX(60deg) translateZ(20px);
  box-shadow: 0 -5px 20px rgba(14, 165, 233, 0.2);
}
.machine-front {
  position: absolute; top: 30px; left: 0; width: 100%; height: 55%;
  background: linear-gradient(180deg, var(--c3), var(--c2));
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}
.evaporator-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  padding: 15px;
}
.evaporator-grid span {
  width: 28px; height: 28px; border-radius: 4px;
  background: linear-gradient(135deg, rgba(14,165,233,0.15), rgba(6,182,212,0.05));
  border: 1px solid rgba(14,165,233,0.2);
  animation: frostCell 3s ease-in-out infinite;
}
.evaporator-grid span:nth-child(odd) { animation-delay: 0.5s; }
.evaporator-grid span:nth-child(3n) { animation-delay: 1s; }
@keyframes frostCell {
  0%, 100% { background: linear-gradient(135deg, rgba(14,165,233,0.1), rgba(6,182,212,0.05)); box-shadow: none; }
  50% { background: linear-gradient(135deg, rgba(125,211,252,0.4), rgba(186,230,253,0.2)); box-shadow: 0 0 10px rgba(14,165,233,0.3); }
}
.machine-bin {
  position: absolute; bottom: 0; left: 5%; width: 90%; height: 35%;
  background: linear-gradient(180deg, var(--c2), var(--c1));
  border: 1px solid var(--glass-border);
  border-radius: 0 0 12px 12px;
  display: flex; align-items: flex-end; justify-content: center;
  gap: 8px; padding: 12px; overflow: hidden;
}
.ice-cube {
  width: 30px; height: 30px; border-radius: 5px;
  background: linear-gradient(135deg, rgba(186,230,253,0.3), rgba(14,165,233,0.15));
  border: 1px solid rgba(125,211,252,0.25);
  backdrop-filter: blur(4px);
  animation: cubeSettle 4s ease-in-out infinite;
}
.c1 { animation-delay: 0s; height: 25px; }
.c2 { animation-delay: 0.3s; height: 32px; }
.c3 { animation-delay: 0.6s; height: 28px; }
.c4 { animation-delay: 0.9s; height: 35px; }
.c5 { animation-delay: 1.2s; height: 22px; }
@keyframes cubeSettle {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-5px); opacity: 1; }
}

/* Frost particles */
.frost-particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.frost-particles i {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--c14); opacity: 0;
  animation: frostDrift 5s linear infinite;
}
.frost-particles i:nth-child(1) { left: 20%; top: 30%; animation-delay: 0s; }
.frost-particles i:nth-child(2) { left: 50%; top: 20%; animation-delay: 1s; }
.frost-particles i:nth-child(3) { left: 75%; top: 40%; animation-delay: 2s; }
.frost-particles i:nth-child(4) { left: 35%; top: 50%; animation-delay: 0.5s; }
.frost-particles i:nth-child(5) { left: 60%; top: 60%; animation-delay: 1.5s; }
.frost-particles i:nth-child(6) { left: 15%; top: 70%; animation-delay: 3s; }
.frost-particles i:nth-child(7) { left: 85%; top: 25%; animation-delay: 2.5s; }
.frost-particles i:nth-child(8) { left: 45%; top: 80%; animation-delay: 3.5s; }
@keyframes frostDrift {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  20% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-80px) scale(1.5); }
}

/* Water drips */
.water-drip {
  position: absolute; width: 3px; border-radius: 0 0 3px 3px;
  background: linear-gradient(180deg, transparent, var(--c13));
  opacity: 0; animation: drip 3s ease-in infinite;
}
.d1 { left: 30%; top: 55%; height: 20px; animation-delay: 0s; }
.d2 { left: 55%; top: 55%; height: 15px; animation-delay: 1.2s; }
.d3 { left: 70%; top: 55%; height: 25px; animation-delay: 2.4s; }
@keyframes drip {
  0% { opacity: 0; transform: translateY(0) scaleY(0.3); }
  30% { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(60px) scaleY(1); }
}

/* ========================================
   STATS SECTION
   ======================================== */
.stats-section {
  position: relative; z-index: 1;
  padding: 3rem 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.stat-card {
  text-align: center; padding: 2rem 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(14, 165, 233, 0.15);
}
.stat-number {
  font-size: 2.8rem; font-weight: 800;
  background: linear-gradient(135deg, var(--c13), var(--c19));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-suffix {
  font-size: 1.5rem; font-weight: 700; color: var(--c14);
}
.stat-card p { color: var(--c7); font-size: 0.95rem; margin-top: 0.25rem; }

/* ========================================
   ARTICLE SECTION
   ======================================== */
.article-section {
  position: relative; z-index: 1;
  padding: 3rem 0;
}
.article-content {
  padding: 3rem 2.5rem;
}
.article-content ul {
  margin: 1rem 0 1.5rem 1.5rem; list-style: disc;
}
.article-content li {
  margin-bottom: 0.5rem; color: var(--c8);
  padding-left: 0.25rem;
}
.article-content li::marker { color: var(--c12); }

/* ========================================
   FAQ SECTION
   ======================================== */
.faq-section {
  position: relative; z-index: 1;
  padding: 4rem 0;
}
.section-title { text-align: center; margin-bottom: 2.5rem; }
.faq-list { display: flex; flex-direction: column; gap: 1rem; max-width: 800px; margin: 0 auto; }
.faq-item { overflow: hidden; transition: box-shadow var(--transition); }
.faq-item:hover { box-shadow: 0 4px 25px rgba(14,165,233,0.1); }
.faq-question {
  width: 100%; background: none; border: none; color: var(--c11);
  padding: 1.25rem 1.5rem; font-size: 1.05rem; font-weight: 600;
  text-align: left; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center;
  font-family: var(--font-main);
}
.faq-icon {
  font-size: 1.5rem; color: var(--c13); transition: transform var(--transition);
  flex-shrink: 0; margin-left: 1rem;
}
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer {
  padding: 0 1.5rem 1.25rem; color: var(--c7);
  animation: faqOpen 0.3s ease-out;
}
@keyframes faqOpen {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  position: relative; z-index: 1;
  padding: 4rem 0;
}
.cta-box {
  text-align: center; padding: 3.5rem 2rem;
  background: linear-gradient(135deg, rgba(14,165,233,0.08), rgba(99,102,241,0.08));
  border: 1px solid rgba(14,165,233,0.2);
}
.cta-box h2 { margin-bottom: 0.75rem; }
.cta-box p { color: var(--c7); max-width: 550px; margin: 0 auto 2rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  position: relative; z-index: 1;
  background: rgba(2, 6, 23, 0.85);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0 1.5rem; margin-top: 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem; margin-bottom: 2rem;
}
.footer-brand h3 { margin-bottom: 0.5rem; }
.footer-brand p { color: var(--c6); font-size: 0.9rem; }
.footer-logo { color: var(--c13); margin-bottom: 0.75rem; }
.footer-contact h4, .footer-social h4 { color: var(--c8); margin-bottom: 0.75rem; font-size: 1rem; }
.footer-contact p { margin-bottom: 0.4rem; font-size: 0.95rem; }
.footer-contact a { color: var(--c7); }
.footer-contact a:hover { color: var(--c13); }
.social-links { display: flex; gap: 1rem; }
.social-links a {
  color: var(--c6); transition: color var(--transition), transform var(--transition);
  display: flex; align-items: center;
}
.social-links a:hover { color: var(--c13); transform: translateY(-2px); }
.footer-bottom {
  text-align: center; padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  color: var(--c5); font-size: 0.85rem;
}

/* ========================================
   BACK TO TOP
   ======================================== */
#back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c12), var(--c21));
  color: var(--c11); border: none; font-size: 1.3rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(14,165,233,0.3);
  transition: all var(--transition); opacity: 0; transform: translateY(20px);
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(14,165,233,0.5); }

/* ========================================
   SCROLL REVEAL
   ======================================== */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .hero { padding: 6rem 1rem 3rem; flex-direction: column; text-align: center; }
  .hero-content { padding: 1.75rem; }
  .hero-ctas { justify-content: center; }
  .hero-visual { max-width: 280px; }
  .ice-machine-3d { width: 200px; height: 280px; animation: none; transform: rotateX(3deg) rotateY(-3deg); }
  .evaporator-grid span { width: 20px; height: 20px; }
  .article-content { padding: 1.75rem 1.25rem; }
  .nav-links { gap: 0.75rem; }
  .nav-links a:not(.nav-cta) { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .stat-card { padding: 1.25rem 0.75rem; }
  .stat-number { font-size: 2rem; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ice-machine-3d { animation: none; transform: none; }
  .logo-container { animation: none; }
  .reveal { opacity: 1; transform: none; }
  #particles-canvas { display: none; }
  .morph-shape { animation: none; }
}