/* ═══════════════════════════════════════════════════════════
   KANZ Landing Page Stylesheet
   Design System: KANZ Blue (#2563EB) · OLED Black (#050505)
   ═══════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #050505;
  color: #ECEFF4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: #2563EB; color: white; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1F1F1F; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* ── Utility ── */
.font-headline { font-family: 'Syne', sans-serif; }



/* ── Hero dot grid ── */
.hero-grid {
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  background-position: center;
}

/* ── Sticky features container (prevents phone from leaking past) ── */
.features-sticky-wrapper {
  position: relative;
}
.features-sticky-wrapper .sticky-phone-col {
  position: sticky;
  top: 5rem;
  height: calc(100vh - 6rem);
  max-height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Hide phone when scrolled past features section */
.features-sticky-wrapper.scrolled-past .sticky-phone-col {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ── QR Demo phone amount sync ── */
#amount-display-phone {
  transition: color 0.2s ease;
}

/* ── Smooth transitions for demo ── */
.qr-demo-phone {
  transition: all 0.3s ease;
}
.qr-demo-phone canvas {
  transition: opacity 0.2s ease;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


.anim-0 { animation: fadeInUp 0.7s ease-out forwards; }
.anim-1 { animation: fadeInUp 0.7s ease-out 0.1s forwards; opacity: 0; }
.anim-2 { animation: fadeInUp 0.7s ease-out 0.2s forwards; opacity: 0; }
.anim-3 { animation: fadeInUp 0.7s ease-out 0.3s forwards; opacity: 0; }
.anim-4 { animation: fadeInUp 0.7s ease-out 0.45s forwards; opacity: 0; }
.anim-5 { animation: fadeInUp 0.8s ease-out 0.6s forwards; opacity: 0; }

/* ── Scroll-triggered fade-in ── */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Nav ── */
.nav-solid {
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #1F1F1F;
}





/* ── Phone frame ── */
.phone-frame {
  background: #0a0a0a;
  border: 2px solid #1a1a1a;
  border-radius: 40px;
  padding: 12px;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 20px 60px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #050505;
  border-radius: 0 0 16px 16px;
  z-index: 10;
}
.phone-screen {
  background: #050505;
  border-radius: 28px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ── Hero phone — floating + brand glow ── */
.hero-phone {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 20px 60px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ── Feature section tracking ── */
.feat-section {
  transition: opacity 0.5s ease;
}
.feat-section:not(.active) { opacity: 0.25; }
.feat-section.active { opacity: 1; }

/* ── QR Demo ── */
.demo-pill {
  padding: 10px 20px;
  border-radius: 9999px;
  border: 1.5px solid #1F1F1F;
  background: transparent;
  color: #B0B8C4;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.demo-pill:hover { border-color: #2563EB; color: #ECEFF4; }
.demo-pill.active {
  background: #2563EB;
  border-color: #2563EB;
  color: white;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.28);
}

/* Amount slider */
.amount-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #1F1F1F;
  border-radius: 3px;
  outline: none;
}
.amount-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563EB;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease;
}
.amount-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.amount-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563EB;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* QR canvas styling */
.qr-canvas {
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* ── Roadmap connector ── */
.roadmap-line {
  position: absolute;
  top: 2.5rem;
  left: 16%;
  right: 16%;
  height: 2px;
  background: linear-gradient(90deg, #1F1F1F 0%, rgba(37,99,235,0.3) 50%, #1F1F1F 100%);
}

/* ── Focus states ── */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ── Mobile nav ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #050505;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .phone-frame {
    border-radius: 32px;
    padding: 8px;
  }
  .phone-frame::before {
    width: 80px;
    height: 24px;
    top: 8px;
    border-radius: 0 0 12px 12px;
  }
  .phone-screen { border-radius: 24px; }
}

/* ── Mobile Optimizations ── */
@media (max-width: 640px) {
  /* Hero section */
  section.hero-grid {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }
  
  /* Prevent horizontal overflow */
  body {
    overflow-x: hidden;
  }
  
  /* Phone mockups - slightly smaller on mobile */
  .phone-frame {
    transform: scale(0.9);
    transform-origin: center;
  }
  
  /* Demo section - stack vertically */
  #demo .flex.flex-col.lg\:flex-row {
    gap: 2rem;
  }
  
  /* Roadmap timeline - tighter spacing */
  #roadmap .relative {
    margin-bottom: 3rem;
  }
  
  /* Contact section */
  #contact .flex {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  /* Early access section */
  #early-access {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
  
  /* Nav - compact on mobile */
  #nav .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Smooth scroll padding for anchors */
  [id] {
    scroll-margin-top: 4rem;
  }
}

/* ── Touch-friendly tap targets ── */
@media (hover: none) and (pointer: coarse) {
  a, button, input[type="range"] {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ── Prevent iOS input zoom ── */
input[type="tel"],
input[type="email"],
input[type="text"] {
  font-size: 16px !important;
}

/* ═══════════════════════════════════════════════════════════
   STICKY WIDGET INTERACTIONS
   Minimal interactivity for the 3 sticky feature mockups.
   ═══════════════════════════════════════════════════════════ */

/* Widget stage — all 3 widgets live in here, absolutely stacked */
.widget {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.widget.active {
  opacity: 1;
  pointer-events: auto;
}

/* Item enter animation (used when offline queue resets) */
@keyframes widgetItemIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.widget-item-enter { animation: widgetItemIn 0.3s ease-out; }

/* Low-stock flash (inventory) */
@keyframes lowStockFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
  50% { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); }
}
.low-stock-flash { animation: lowStockFlash 1.2s ease-in-out infinite; }

/* Live "selling" dot (inventory) */
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}
.live-dot { animation: livePulse 1.5s ease-in-out infinite; }

/* Active staff border (staff) */
.staff-item {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.staff-item.active {
  border-color: rgba(37, 99, 235, 0.55) !important;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
  background-color: rgba(37, 99, 235, 0.06) !important;
}
.staff-item.active .staff-avatar {
  background-color: rgba(37, 99, 235, 0.3) !important;
  color: #2563EB !important;
}
.staff-item.active .staff-status-dot {
  background-color: #2563EB !important;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.6);
  animation: livePulse 1.5s ease-in-out infinite;
}

/* Mobile widget layout — Kanz app dark mode (landing colors + app shapes) */
.mobile-widget {
  position: relative;
  min-height: 420px;
  padding: 20px;
  background: #111111;
  color: #ECEFF4;
  border: 1px solid #1F1F1F;
  border-radius: 20px;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.mobile-widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: #2563EB;
  border-radius: 0 4px 4px 0;
}

/* ── Real app screen recreations (Kanz dark mode, app-shaped) ── */

.app-screen {
  background: #050505;
  color: #ECEFF4;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.app-card {
  background: #111111;
  border: 1px solid #1F1F1F;
  border-radius: 20px;
  color: #ECEFF4;
}
.app-card-sm {
  background: #111111;
  border: 1px solid #1F1F1F;
  border-radius: 14px;
  color: #ECEFF4;
}
.app-btn-primary {
  background: #2563EB;
  color: #FFFFFF;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
}
.app-btn-icon {
  background: #111111;
  border: 1px solid #1F1F1F;
  border-radius: 14px;
  color: #ECEFF4;
}
.app-text-pri { color: #ECEFF4; }
.app-text-sec { color: #B0B8C4; }
.app-text-mut { color: #6B7280; }
.app-text-brand { color: #2563EB; }
.app-text-success { color: #4ADE80; }
.app-text-warn { color: #FBBF24; }
.app-text-error { color: #F87171; }
.app-border { border-color: #1F1F1F; }
.app-border-light { border-color: #161616; }
.app-bg-surface { background: #111111; }
.app-bg-elevated { background: #1A1A1A; }
.app-bg-brand-tint { background: rgba(37, 99, 235, 0.12); }
.app-bg-success-tint { background: rgba(74, 222, 128, 0.10); }
.app-bg-warn-tint { background: rgba(251, 191, 36, 0.10); }
.app-bg-error-tint { background: rgba(248, 113, 113, 0.10); }
.app-bg-red-tint { background: rgba(248, 113, 113, 0.10); }
.app-bg-amber-tint { background: rgba(251, 191, 36, 0.10); }
.app-bg-yellow-tint { background: rgba(251, 191, 36, 0.10); }
.app-bg-blue-tint { background: rgba(37, 99, 235, 0.12); }
.app-bg-stone-tint { background: rgba(255, 255, 255, 0.04); }
.app-bg-green-tint { background: rgba(74, 222, 128, 0.10); }
.app-divider { border-color: #161616; }

/* POS product tap floater */
@keyframes posFloater {
  0% { opacity: 0; transform: translateY(0) scale(0.8); }
  20% { opacity: 1; transform: translateY(-6px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-30px) scale(1); }
}
.pos-floater {
  position: absolute;
  color: #2563EB;
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
  animation: posFloater 0.7s ease-out forwards;
  z-index: 10;
}

/* Product / team item hover */
.pos-product, .team-item, .prod-item {
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}
.pos-product:hover { border-color: #2563EB !important; transform: translateY(-1px); }
.pos-product:active { transform: scale(0.97); }

/* Team active state */
.team-item.active {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 1px #2563EB;
  background-color: rgba(37, 99, 235, 0.08) !important;
}
.team-item.active .team-avatar {
  background-color: #2563EB !important;
  color: white !important;
}

/* Hide scrollbar on category chip strip */
.pos-chips::-webkit-scrollbar { display: none; }
.pos-chips { scrollbar-width: none; }
.pos-chip {
  background: #1A1A1A !important;
  color: #B0B8C4 !important;
  border-color: #1F1F1F !important;
}
.pos-chip.active { background-color: #2563EB !important; color: white !important; border-color: #2563EB !important; }

/* Search input focus */
.prod-search-input:focus { outline: none; }
.prod-search-input::placeholder { color: #6B7280; }

/* Sync queue indicator — Kanz dark amber tint */
.sync-queue-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 12px;
  color: #FCD34D;
  font-size: 10px;
  font-weight: 600;
}
.sync-queue-indicator .sync-icon {
  animation: syncSpin 2s linear infinite;
}
@keyframes syncSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
