/**
 * Gasha Digital - Apps Landing Page Styles
 * Custom styles and Tailwind enhancements
 */

/* Base */
body {
  font-family: 'Poppins', system-ui, sans-serif;
}

/* Light mode: force dark text for visibility - overrides Tailwind dark: bleed */
html:not(.dark) body {
  color: #0f172a !important;
}

html:not(.dark) h1 {
  color: #0f172a !important;
}

html:not(.dark) h2,
html:not(.dark) h3 {
  color: #1e293b !important;
}

html:not(.dark) p {
  color: #334155 !important;
}

/* Card content - all text dark in light mode */
html:not(.dark) .card-hover .font-semibold,
html:not(.dark) .card-hover p,
html:not(.dark) .card-hover span,
html:not(.dark) .card-hover a:not(.bg-brand-600):not(.bg-brand-500) {
  color: #334155 !important;
}

html:not(.dark) .card-hover h3 {
  color: #0f172a !important;
}

/* Placeholder cards */
html:not(.dark) .rounded-xl.border-dashed p,
html:not(.dark) .rounded-xl.border-dashed i {
  color: #64748b !important;
}

/* Brand buttons: white text on orange */
html:not(.dark) a.bg-brand-600,
html:not(.dark) a.bg-brand-500 {
  color: #ffffff !important;
}

html:not(.dark) a.bg-brand-600 i,
html:not(.dark) a.bg-brand-500 i {
  color: #ffffff !important;
}

html:not(.dark) .theme-toggle {
  color: #475569 !important;
}

/* Store buttons - theme-aware */
.btn-app-store {
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

html:not(.dark) .btn-app-store {
  background: #000;
  border: 1px solid #333;
  color: #fff;
}

html:not(.dark) .btn-app-store:hover {
  background: #1d1d1f;
  border-color: #444;
  color: #fff;
}

.dark .btn-app-store {
  background: #f5f5f7;
  border: 1px solid #e5e5e7;
  color: #1d1d1f;
}

.dark .btn-app-store:hover {
  background: #e8e8ed;
  border-color: #d2d2d7;
  color: #1d1d1f;
}

.btn-google-play {
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

html:not(.dark) .btn-google-play {
  background: #00875a;
  border: 1px solid #006b47;
  color: #fff;
}

html:not(.dark) .btn-google-play:hover {
  background: #00a86b;
  border-color: #00875a;
  color: #fff;
}

.dark .btn-google-play {
  background: #00c853;
  border: 1px solid #00e676;
  color: #000;
}

.dark .btn-google-play:hover {
  background: #00e676;
  border-color: #69f0ae;
  color: #000;
}

.btn-chrome-extension {
  transition: background-color 0.2s, color 0.2s;
}

html:not(.dark) .btn-chrome-extension {
  background: #db5c16;
  color: #fff;
}

html:not(.dark) .btn-chrome-extension:hover {
  background: #ea7620;
  color: #fff;
}

.dark .btn-chrome-extension {
  background: #ea7620;
  color: #fff;
}

.dark .btn-chrome-extension:hover {
  background: #ee9243;
  color: #fff;
}

/* Footer */
html:not(.dark) footer p,
html:not(.dark) footer a {
  color: #475569 !important;
}

html:not(.dark) footer .font-semibold {
  color: #0f172a !important;
}

/* Gradient mesh background */
/* Base gradient (dark mode default) */
.gradient-mesh {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(234, 118, 32, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(234, 118, 32, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 0% 50%, rgba(59, 130, 246, 0.06), transparent);
}

/* Light mode: subtle gradient, ensure body bg shows through */
html:not(.dark) .gradient-mesh {
  background-color: #f8fafc; /* slate-50 */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(234, 118, 32, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(234, 118, 32, 0.04), transparent),
    radial-gradient(ellipse 50% 30% at 0% 50%, rgba(59, 130, 246, 0.03), transparent);
}

/* Dark mode: gradient overlays on dark bg */
.dark .gradient-mesh {
  background-color: #0f1629; /* slate-950 */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(234, 118, 32, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(234, 118, 32, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 0% 50%, rgba(59, 130, 246, 0.06), transparent);
}

/* Card hover effects */
.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dark .card-hover:hover {
  box-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.5);
}

/* Logo visibility for theme switching */
.logo-dark {
  display: block;
}

.logo-light {
  display: none;
}

.dark .logo-dark {
  display: none;
}

.dark .logo-light {
  display: block;
}

/* Theme toggle button */
.theme-toggle {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.98);
}

/* Sticky navbar: glossy gradient background - theme aware */
.site-header {
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Light mode header: lighter gradient, dark logo & text */
html:not(.dark) .site-header {
  background: #5a9ad4;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.15) 40%, transparent 70%),
    linear-gradient(90deg, rgba(47, 115, 184, 0.95) 0%, rgba(79, 104, 118, 0.9) 46%, rgba(245, 176, 70, 0.95) 100%);
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .site-header .nav-link,
html:not(.dark) .site-header .theme-toggle,
html:not(.dark) .site-header #mobile-menu-btn {
  color: rgba(0, 0, 0, 0.85) !important;
}

html:not(.dark) .site-header .nav-link:hover,
html:not(.dark) .site-header .theme-toggle:hover {
  color: #000 !important;
}

html:not(.dark) .site-header .theme-toggle:hover,
html:not(.dark) .site-header #mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.4) !important;
}

/* Dark mode header: dark glossy gradient, light logo & text */
.dark .site-header {
  background: #1a3a5c;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 35%, transparent 60%),
    linear-gradient(90deg, rgba(22, 50, 85, 1) 0%, rgba(35, 50, 65, 1) 46%, rgba(95, 75, 40, 1) 100%);
  border-color: rgba(0, 0, 0, 0.35) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.25);
}

.dark .site-header .nav-link,
.dark .site-header .theme-toggle,
.dark .site-header #mobile-menu-btn {
  color: rgba(255, 255, 255, 0.95) !important;
}

.dark .site-header .nav-link:hover,
.dark .site-header .theme-toggle:hover {
  color: #fff !important;
}

.dark .site-header .theme-toggle:hover,
.dark .site-header #mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* Nav link underline animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(234, 118, 32, 0.6);
  outline-offset: 2px;
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Stagger animation for cards */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }

/* Button press effect */
.btn-press:active {
  transform: scale(0.98);
}

/* Section fade-in on scroll (optional enhancement) */
.section-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
