/* =========================================================
   Chronela Landing v4 — Premium Enterprise Design
   ========================================================= */

html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; color: #1e293b; }

/* ----- Text Gradient ----- */
.text-gradient {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #6366f1);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ----- Nav ----- */
.nav-scrolled {
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom-color: rgba(0,0,0,0.08) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ----- Hero gradient ----- */
.hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99,102,241,0.1), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 30%, rgba(139,92,246,0.08), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 70%, rgba(59,130,246,0.05), transparent 60%);
}
.section-accent {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.section-indigo {
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 50%, #eef2ff 100%);
}

/* ----- Cards ----- */
.feature-card {
  padding: 32px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.feature-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 8px 30px rgba(99,102,241,0.1);
  transform: translateY(-4px);
}
.feature-card:hover::before {
  opacity: 1;
}
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border: 1px solid #c7d2fe;
  display: grid; place-items: center; font-size: 24px; margin-bottom: 16px;
  transition: transform 0.3s ease;
}

/* ----- Branch cards ----- */
.branch-card {
  padding: 28px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.branch-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 8px 30px rgba(99,102,241,0.1);
  transform: translateY(-3px);
}

/* ----- Stat cards ----- */
.stat-card {
  padding: 28px 16px; border-radius: 16px; text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
}
.stat-card:hover { border-color: #c7d2fe; transform: translateY(-3px); }
.stat-num {
  font-size: 36px; font-weight: 900; line-height: 1; margin-bottom: 6px;
  color: #4f46e5;
}
.stat-label {
  font-size: 11px; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}

/* ----- UI Mockup (fake screenshot) ----- */
.mockup-window {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}
.mockup-bar {
  background: #f8fafc;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid #e2e8f0;
}
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-body { padding: 0; }

/* Sidebar replica */
.mock-sidebar {
  width: 220px; min-height: 100%;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  padding: 16px 12px;
  overflow-y: auto;
}
.mock-sidebar-item {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #64748b;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 1px;
  white-space: nowrap;
}
.mock-sidebar-item.active {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}

/* ----- Comparison table ----- */
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.compare-table th, .compare-table td {
  padding: 14px 20px; text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.compare-table thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: #64748b; font-weight: 700; background: #f8fafc;
}
.compare-table .hl {
  background: #eef2ff;
  border-left: 2px solid #6366f1;
  border-right: 2px solid #6366f1;
}
.compare-table thead .hl {
  background: #e0e7ff;
  border-top: 2px solid #6366f1;
  border-radius: 12px 12px 0 0;
}
.compare-table tbody tr:last-child .hl {
  border-bottom: 2px solid #6366f1;
  border-radius: 0 0 12px 12px;
}

/* ----- Pricing ----- */
.pricing-card {
  padding: 40px 32px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.pricing-popular {
  border: 2px solid #6366f1;
  box-shadow: 0 8px 30px rgba(99,102,241,0.15);
  position: relative;
}

/* ----- FAQ ----- */
.faq-item {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.faq-item[open] { border-color: #a5b4fc; }
.faq-item summary {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  color: #1e293b;
  transition: color 0.2s;
}
.faq-item summary:hover { color: #4f46e5; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: #6366f1; font-size: 20px; font-weight: 300;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '\2212'; transform: rotate(180deg); }
.faq-body { padding: 0 24px 20px 24px; color: #64748b; line-height: 1.7; }

/* ----- Form ----- */
.field-label { display: block; font-size: 13px; color: #475569; margin-bottom: 6px; font-weight: 600; }
.field {
  width: 100%; padding: 12px 16px; border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff; color: #1e293b; font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.field::placeholder { color: #94a3b8; }

/* ----- Scroll animations ----- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Staggered children */
.fade-in.visible > .feature-card,
.fade-in.visible > .branch-card,
.fade-in.visible > .stat-card,
.fade-in.visible > .module-card {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}
.fade-in.visible > *:nth-child(1) { animation-delay: 0s; }
.fade-in.visible > *:nth-child(2) { animation-delay: 0.05s; }
.fade-in.visible > *:nth-child(3) { animation-delay: 0.1s; }
.fade-in.visible > *:nth-child(4) { animation-delay: 0.15s; }
.fade-in.visible > *:nth-child(5) { animation-delay: 0.2s; }
.fade-in.visible > *:nth-child(6) { animation-delay: 0.25s; }
.fade-in.visible > *:nth-child(7) { animation-delay: 0.3s; }
.fade-in.visible > *:nth-child(8) { animation-delay: 0.35s; }
.fade-in.visible > *:nth-child(9) { animation-delay: 0.4s; }
.fade-in.visible > *:nth-child(10) { animation-delay: 0.45s; }
.fade-in.visible > *:nth-child(n+11) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- Buttons ----- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff; font-weight: 600; font-size: 15px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
  border: none; cursor: pointer;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca, #4f46e5);
  box-shadow: 0 4px 16px rgba(79,70,229,0.35);
  transform: translateY(-1px);
}
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px;
  background: #fff; color: #1e293b; font-weight: 600; font-size: 15px;
  border: 1px solid #d1d5db;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-secondary:hover {
  background: #f8fafc; border-color: #94a3b8;
  transform: translateY(-1px);
}

/* ----- Badge ----- */
.badge-indigo {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 100px;
  background: #eef2ff; color: #4338ca;
  font-size: 13px; font-weight: 600;
  border: 1px solid #c7d2fe;
}

/* ----- Mobile menu ----- */
.mobile-menu { display: none; }
.mobile-menu.open { display: flex; }

/* ----- Module grid ----- */
.module-card {
  padding: 16px 20px; border-radius: 12px;
  background: #fff; border: 1px solid #e2e8f0;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  display: flex; align-items: center;
}
.module-card:hover { border-color: #c7d2fe; box-shadow: 0 4px 16px rgba(99,102,241,0.08); transform: translateY(-2px); }

/* ----- Selection / scrollbar ----- */
::selection {
  background: #c7d2fe;
  color: #1e293b;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .stat-num { font-size: 28px; }
  .compare-table { font-size: 13px; }
  .compare-table th, .compare-table td { padding: 10px 12px; }
  .mock-sidebar { width: 180px; }
}

@media (max-width: 640px) {
  .feature-card { padding: 24px; }
  .pricing-card { padding: 28px 24px; }
}
