/* ==========================================================================
   FINOVO - Live Preview Landing Page Stylesheet
   Crafted with Finovo Brand Guidelines: Forest Green, Emerald & Sage Tones
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --color-forest-950: #05120e;
  --color-forest-900: #0a1f18;
  --color-forest-800: #0f2d24;
  --color-forest-700: #153e31;
  --color-forest-600: #1c5241;
  
  --color-emerald-500: #10b981;
  --color-emerald-400: #34d399;
  --color-emerald-600: #059669;
  
  --color-sage-50: #f7faf8;
  --color-sage-100: #eef5f1;
  --color-sage-200: #dceae2;
  --color-sage-300: #c2dacf;
  --color-sage-400: #9fc1b2;
  
  --color-cream: #fbfdfc;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--color-cream);
  color: #1e293b;
}

.font-serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
}

/* Finovo Explicit Color Utilities */
.bg-forest {
  background-color: #0f2d24 !important;
}
.bg-forest-dark {
  background-color: #0a1f18 !important;
}
.text-forest {
  color: #0f2d24 !important;
}
.border-forest {
  border-color: rgba(15, 45, 36, 0.15) !important;
}

/* Explicit Button Utilities (Guaranteed High Contrast in all environments) */
.btn-forest {
  background-color: #0f2d24 !important;
  color: #ffffff !important;
  border: 1px solid #0f2d24 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn-forest * {
  color: #ffffff !important;
}
.btn-forest:hover {
  background-color: #184437 !important;
  border-color: #184437 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(15, 45, 36, 0.3) !important;
}

.btn-white {
  background-color: #ffffff !important;
  color: #0f2d24 !important;
  border: 1px solid rgba(15, 45, 36, 0.18) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn-white,
.btn-white span,
.btn-white div,
.btn-white p {
  color: #0f2d24 !important;
}
.btn-white i.text-emerald-600,
.btn-white .text-emerald-600 {
  color: #059669 !important;
}
.btn-white:hover {
  background-color: #f6faf8 !important;
  color: #0f2d24 !important;
  border-color: rgba(15, 45, 36, 0.35) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(10, 31, 24, 0.15) !important;
}

.btn-emerald {
  background-color: #059669 !important;
  color: #ffffff !important;
  border: 1px solid #059669 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn-emerald * {
  color: #ffffff !important;
}
.btn-emerald:hover {
  background-color: #047857 !important;
  border-color: #047857 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.4) !important;
}

/* Background Gradients & Mesh */
.hero-mesh-bg {
  background-color: #fafcfb;
  background-image: 
    radial-gradient(at 15% 15%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 85% 20%, rgba(21, 62, 49, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 80%, rgba(220, 234, 226, 0.5) 0px, transparent 60%);
}

.grid-pattern {
  background-image: linear-gradient(to right, rgba(15, 45, 36, 0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(15, 45, 36, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

.dark-mesh-bg {
  background-color: #0a1f18 !important;
  background-image: 
    radial-gradient(at 80% 0%, rgba(16, 185, 129, 0.25) 0px, transparent 50%),
    radial-gradient(at 20% 100%, rgba(52, 211, 153, 0.14) 0px, transparent 50%) !important;
  color: #ffffff !important;
}

/* Explicit Footer Dark Theme */
footer,
.preview-footer {
  background-color: #0a1f18 !important;
  color: #94a3b8 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

footer .logo-text,
footer h1, footer h2, footer h3, footer h4,
footer .text-white {
  color: #ffffff !important;
}

footer a {
  color: #94a3b8 !important;
  transition: color 0.2s ease !important;
}

footer a:hover {
  color: #34d399 !important;
}

footer a.text-emerald-400 {
  color: #34d399 !important;
}

/* Header & Navigation */
.preview-nav-blur {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(255, 255, 255, 0.92);
}

/* Browser Mockup Container */
.browser-window {
  border-radius: 1rem;
  border: 1px solid rgba(15, 45, 36, 0.1);
  box-shadow: 0 20px 40px -15px rgba(10, 31, 24, 0.07), 0 0 1px 1px rgba(10, 31, 24, 0.04);
  background: #ffffff;
  overflow: hidden;
  max-width: 100%;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.browser-header {
  background: #f8faf9;
  border-bottom: 1px solid rgba(15, 45, 36, 0.06);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.browser-dots {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.browser-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 9999px;
}
.browser-dot-red { background-color: #fb7185; }
.browser-dot-yellow { background-color: #facc15; }
.browser-dot-green { background-color: #4ade80; }

.browser-url-bar {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  border: 1px solid rgba(15, 45, 36, 0.08);
  border-radius: 9999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.7rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   HERO MULTI-ROW SCROLLING SHOWCASE (MARQUEE + PARALLAX)
   ========================================================================== */
.hero-marquee-viewport {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  padding: 2.5rem 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  user-select: none;
}

/* Gradient edge mask for soft fade at left/right edges */
.hero-marquee-viewport::before,
.hero-marquee-viewport::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10%;
  min-width: 60px;
  max-width: 180px;
  z-index: 20;
  pointer-events: none;
}

.hero-marquee-viewport::before {
  left: 0;
  background: linear-gradient(to right, #fafcfb 20%, rgba(250, 252, 251, 0));
}

.hero-marquee-viewport::after {
  right: 0;
  background: linear-gradient(to left, #fafcfb 20%, rgba(250, 252, 251, 0));
}

.hero-marquee-row-wrapper {
  overflow: hidden;
  width: 100%;
  display: flex;
}

.hero-marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  will-change: transform;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Initial offsets for natural visual balance */
.hero-track-left {
  transform: translateX(0px);
}

.hero-track-right {
  transform: translateX(-360px);
}

/* Hero Showcase Card */
.hero-showcase-card {
  width: 440px;
  flex-shrink: 0;
  border-radius: 1rem;
  border: 1px solid rgba(15, 45, 36, 0.1);
  background: #ffffff;
  box-shadow: 0 16px 36px -12px rgba(10, 31, 24, 0.08), 0 0 1px 1px rgba(10, 31, 24, 0.04);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.hero-showcase-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 28px 50px -15px rgba(10, 31, 24, 0.18), 0 0 0 1px rgba(16, 185, 129, 0.4);
  border-color: rgba(16, 185, 129, 0.45);
  z-index: 15;
}

.hero-showcase-card .screenshot-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: #f1f5f3;
}

.hero-showcase-card .screenshot-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}

.hero-showcase-card:hover .screenshot-box img {
  transform: scale(1.04);
}

.hero-showcase-card .card-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 31, 24, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.hero-showcase-card:hover .card-hover-overlay {
  opacity: 1;
}

@media (max-width: 768px) {
  .hero-showcase-card {
    width: 320px;
  }
}

@media (max-width: 480px) {
  .hero-showcase-card {
    width: 270px;
  }
  .hero-marquee-viewport {
    padding: 1.5rem 0 1rem 0;
    gap: 1rem;
  }
  .hero-marquee-track {
    gap: 1rem;
  }
}

/* Screenshot Card Hover Effects (Section 4) */
.page-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.page-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -12px rgba(10, 31, 24, 0.14), 0 0 0 1px rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
}

.page-card .screenshot-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10.5;
  background-color: #f1f5f3;
}

.page-card .screenshot-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-card:hover .screenshot-wrapper img {
  transform: scale(1.03);
}

.page-card .overlay-action {
  position: absolute;
  inset: 0;
  background: rgba(10, 31, 24, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.page-card:hover .overlay-action {
  opacity: 1;
}

/* Floating Animations */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(8px); }
}

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

.animate-float-reverse {
  animation: floatReverse 7s ease-in-out infinite;
}

/* Floating UI Badges */
.glass-badge {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 24px -6px rgba(10, 31, 24, 0.12), 0 0 0 1px rgba(15, 45, 36, 0.05);
}

/* Filter & Search Toolbar */
.preview-filter-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 3rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(15, 45, 36, 0.08);
  width: 100%;
}

@media (min-width: 1024px) {
  .preview-filter-toolbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.preview-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

@media (min-width: 1024px) {
  .preview-filter-tabs {
    justify-content: flex-start;
  }
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.15rem !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
}

.filter-tab.active {
  background-color: #0f2d24 !important;
  color: #ffffff !important;
  border: 1px solid #0f2d24 !important;
  box-shadow: 0 4px 12px -2px rgba(15, 45, 36, 0.25) !important;
}

.filter-tab:not(.active) {
  background-color: #ffffff !important;
  color: #475569 !important;
  border: 1px solid rgba(15, 45, 36, 0.12) !important;
}

.filter-tab:not(.active):hover {
  background-color: #eef5f1 !important;
  color: #0f2d24 !important;
  border-color: rgba(15, 45, 36, 0.25) !important;
}

.preview-search-box {
  position: relative;
  width: 100%;
  max-width: 320px;
  flex-shrink: 0;
}

.preview-search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem !important;
  font-size: 0.85rem !important;
  background-color: #ffffff !important;
  border: 1px solid rgba(15, 45, 36, 0.14) !important;
  border-radius: 9999px !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.2s ease !important;
}

.preview-search-box input:focus {
  outline: none !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18) !important;
}

.preview-search-box .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 0.85rem;
}

/* Feature Showcase Alternating */
.feature-showcase-box {
  background: #ffffff;
  border: 1px solid rgba(15, 45, 36, 0.08);
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px -10px rgba(10, 31, 24, 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-showcase-box:hover {
  box-shadow: 0 20px 40px -12px rgba(10, 31, 24, 0.08);
}

/* Smooth Reveal on Scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay helpers */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f3;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .animate-float-slow,
  .animate-float-reverse,
  .hero-track-left,
  .hero-track-right {
    animation: none !important;
  }
  .page-card,
  .browser-window,
  .hero-showcase-card {
    transition: none !important;
  }
}
