/* ===================================================
   SoinExpress CI — Custom styles
   =================================================== */

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================
   NAVBAR scroll state
   ========================= */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -8px rgba(15, 23, 42, 0.08);
}

/* =========================
   Reveal on scroll
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Phone frames
   ========================= */
.phone-frame {
  position: relative;
  width: 300px;
  height: 600px;
  background: #0f172a;
  border-radius: 42px;
  padding: 12px;
  box-shadow:
    0 40px 70px -20px rgba(15, 23, 42, 0.45),
    0 18px 30px -10px rgba(30, 64, 175, 0.25),
    inset 0 0 0 2px rgba(255, 255, 255, 0.05);
}
.phone-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 44px;
  background: linear-gradient(135deg, #1e40af 0%, #0f172a 50%, #10b981 100%);
  z-index: -1;
  opacity: 0.25;
  filter: blur(12px);
}

.phone-frame.mini {
  width: 200px;
  height: 400px;
  border-radius: 30px;
  padding: 8px;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
}
.phone-frame.mini .phone-screen {
  border-radius: 22px;
}

.phone-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 18px;
  background: #0f172a;
  border-radius: 0 0 14px 14px;
  z-index: 40;
}
.phone-frame.mini .phone-notch {
  width: 50px;
  height: 12px;
  top: 4px;
  border-radius: 0 0 8px 8px;
}

/* =========================
   App rail – horizontal scroll of 5 phones
   ========================= */
.app-rail {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding: 40px 4px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}
.app-rail::-webkit-scrollbar {
  height: 6px;
}
.app-rail::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 10px;
}
.app-rail::-webkit-scrollbar-track { background: transparent; }

.app-rail-track {
  display: flex;
  gap: 32px;
  min-width: min-content;
  justify-content: center;
  padding: 0 16px;
}

/* When there's enough space, keep them centered; otherwise allow horizontal scroll */
@media (max-width: 1180px) {
  .app-rail-track {
    justify-content: flex-start;
  }
}

/* =========================
   Floating animations
   ========================= */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.animate-float {
  animation: floatY 4s ease-in-out infinite;
}
.animate-float-delay {
  animation: floatY 4s ease-in-out infinite;
  animation-delay: 1.8s;
}

/* =========================
   Small responsive tweaks
   ========================= */
@media (max-width: 640px) {
  .phone-frame { width: 260px; height: 520px; border-radius: 36px; }
  .phone-screen { border-radius: 26px; }
  .phone-notch { width: 70px; height: 16px; }
}

/* Print optimizations (useful for investor PDF export) */
@media print {
  #navbar, footer a, #mobileMenu, #contactForm button { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  section { page-break-inside: avoid; }
}
