/* ==========================================================================
   PRODIGY SOFTWARE - BASE STYLES & CORE LAYOUT
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 10% 20%, rgba(0, 242, 254, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 10%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 80%, rgba(138, 43, 226, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Background Grid Overlay */
.bg-grid-overlay {
  position: fixed;
  inset: 0;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: -1;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-bright);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-purple {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  height: var(--nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: all var(--transition-normal);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--grad-primary);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: var(--shadow-glow-cyan);
}

.logo-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  border-radius: var(--border-radius-pill);
  text-transform: uppercase;
  margin-left: 0.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-bright);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-primary);
  border-radius: var(--border-radius-pill);
}

/* Navigation Dropdown Menu */
.nav-item-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-dropdown-trigger svg {
  transition: transform var(--transition-fast);
}

.nav-item-dropdown:hover .nav-dropdown-trigger,
.nav-item-dropdown:focus-within .nav-dropdown-trigger,
.nav-item-dropdown.active .nav-dropdown-trigger {
  color: var(--text-bright);
}

.nav-item-dropdown:hover .nav-dropdown-trigger svg,
.nav-item-dropdown:focus-within .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(8, 14, 26, 0.97);
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-lg);
  padding: 0.5rem;
  min-width: 270px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(0, 242, 254, 0.08);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu,
.nav-item-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(2px);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--border-radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-dropdown-item:hover {
  background: rgba(0, 242, 254, 0.08);
  color: var(--accent-cyan);
}

.nav-dropdown-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.nav-dropdown-item:hover .nav-dropdown-item-icon {
  background: rgba(0, 242, 254, 0.15);
}

.nav-dropdown-item-title {
  font-weight: 600;
  color: #fff;
  font-size: 0.875rem;
}

.nav-dropdown-item:hover .nav-dropdown-item-title {
  color: var(--accent-cyan);
}

.nav-dropdown-item-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-bright);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: var(--border-radius-pill);
  margin-bottom: 1.5rem;
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 5px rgba(0, 242, 254, 0.1); }
  100% { box-shadow: 0 0 20px rgba(0, 242, 254, 0.25); }
}

.hero-badge-pill svg {
  width: 14px;
  height: 14px;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.25rem;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Hero Stats Bar */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem 2rem;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-md);
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -0.75rem;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border-subtle);
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-bright);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ==========================================================================
   CATALOG & FILTER BAR
   ========================================================================== */

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.35rem;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  background: var(--bg-card);
  padding: 0.85rem 1.25rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-subtle);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 400px;
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  color: var(--text-bright);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  width: 16px;
  height: 16px;
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.cat-pill {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.95rem;
  border-radius: var(--border-radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.cat-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-bright);
}

.cat-pill.active {
  background: var(--grad-primary);
  color: #000;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 242, 254, 0.3);
}

/* ==========================================================================
   PRODUCT SHOWCASE GRID
   ========================================================================== */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-bright);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.925rem;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 1rem;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */

@media (max-width: 992px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .stat-item:nth-child(2)::after {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 1.05rem;
  }
  .apps-grid {
    grid-template-columns: 1fr;
  }
  .stats-banner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
