/* ==========================================================================
   MegaFulfilment (megaff.uz) — Custom Stylesheet (Pure HTML/CSS, GitHub Pages Ready)
   ========================================================================== */

:root {
  --dot-color: #BFD2F2;
  --dot-link-color: #2563EB;
  --card-glow: rgba(37, 99, 235, 0.11);
}

.dark {
  --dot-color: #24395C;
  --dot-link-color: #60A5FA;
  --card-glow: rgba(96, 165, 250, 0.13);
}

body {
  background-color: #F2F7FF;
  color: #0B2345;
}

/* Interactive dot grid, drawn by initDotField() in js/app-core.js */
.dot-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.dark body {
  background-color: #081326;
  color: #E6EEFA;
}

/* #2563EB is too dark to read on navy, so accent text lightens in dark mode */
.dark .text-\[\#2563EB\] {
  color: #60A5FA;
}

.primary-gradient-btn {
  background: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 50%, #2563EB 100%);
  background-size: 200% auto;
  color: #FFFFFF;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-gradient-btn:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.45);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: #E4EEFD;
  border: 1px solid #C4D7F5;
  color: #1D4ED8;
}

.dark .badge-pill {
  background-color: #172947;
  border-color: #2C4264;
  color: #60A5FA;
}

.floating-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid #DAE6F8;
  border-radius: 22px;
  box-shadow: 0 8px 30px -4px rgba(11, 35, 69, 0.06);
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease;
}

.dark .floating-card {
  background: rgba(15, 29, 54, 0.92);
  border-color: #233652;
  box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.45);
}

.floating-card:hover {
  --card-lift: -4px;
  border-color: #2563EB;
  box-shadow: 0 16px 36px -6px rgba(37, 99, 235, 0.2);
}

.step-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background-color: #E9F1FD;
  color: #0B2345;
  font-weight: 800;
  transition: all 0.15s;
  user-select: none;
}

.dark .step-btn {
  background-color: #1B2F50;
  color: #FFFFFF;
}

.step-btn:hover {
  background-color: #60A5FA;
  color: #0B2345;
  transform: scale(1.06);
}

.active-lang {
  background-color: #2563EB !important;
  color: #FFFFFF !important;
  border-radius: 9999px;
}

.reveal-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatSlow {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

.animate-float {
  animation: floatSlow 4s ease-in-out infinite;
}

/* ==========================================================================
   Left Fixed Side Dot Navigation (Baraka 1:1 Stepper)
   ========================================================================== */
.side-dot-nav {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  user-select: none;
}

@media (min-width: 1280px) {
  .side-dot-nav {
    display: flex;
  }
}

.side-dot-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Continuous vertical line passing through the center of the 16px dots (left: 7.25px) */
.side-dot-track::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7.25px;
  width: 1.5px;
  background-color: #B4C6E2;
  z-index: 0;
}

.dark .side-dot-track::before {
  background-color: #2F4568;
}

.side-dot-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.side-dot-circle {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background-color: #F2F7FF;
  border: 1.75px solid #8299BA;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.dark .side-dot-circle {
  background-color: #081326;
  border-color: #5A7196;
}

.side-dot-item:hover .side-dot-circle {
  border-color: #2563EB;
  transform: scale(1.1);
}

.side-dot-item.active .side-dot-circle {
  background-color: #2563EB;
  border: 2.5px solid #FFFFFF;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.20),
    0 0 0 9px rgba(37, 99, 235, 0.09);
  transform: scale(1.12);
}

.dark .side-dot-item.active .side-dot-circle {
  border-color: #0B2345;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.28),
    0 0 0 9px rgba(37, 99, 235, 0.12);
}

.side-dot-label {
  margin-left: 12px;
  padding: 5px 14px;
  border-radius: 9999px;
  background-color: #0B2345;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.dark .side-dot-label {
  background-color: #172947;
  border: 1px solid #2F4568;
}

.side-dot-item.active .side-dot-label,
.side-dot-item:hover .side-dot-label {
  opacity: 1;
  transform: translateX(0);
}

/* Tier Card Checkbox Custom Look */
.tier-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid #DAE6F8;
  border-radius: 18px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .tier-card {
  background: rgba(15, 29, 54, 0.92);
  border-color: #233652;
}

.tier-card:hover {
  border-color: #1D4ED8;
}

.tier-card.tier-active {
  border-color: #2563EB;
  background: #F5F9FF;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.16);
}

.dark .tier-card.tier-active {
  border-color: #60A5FA;
  background: #142542;
}

/* ==========================================================================
   Card Motion: staggered entrance, cursor tilt and spotlight glow
   ========================================================================== */
.floating-card,
.tier-card {
  position: relative;
  transform:
    perspective(900px)
    rotateX(var(--card-tilt-x, 0deg))
    rotateY(var(--card-tilt-y, 0deg))
    translateY(var(--card-lift, 0px));
}

.floating-card::before,
.tier-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    280px circle at var(--card-glow-x, 50%) var(--card-glow-y, 50%),
    var(--card-glow),
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.floating-card:hover::before,
.tier-card:hover::before {
  opacity: 1;
}

.card-pending {
  opacity: 0;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
}

.card-enter {
  animation: cardEnter 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: calc(var(--card-order, 0) * 80ms);
}

@media (prefers-reduced-motion: reduce) {
  .animate-float {
    animation: none;
  }
}
