/* =========================================================================
   Gryfl B2B Theme - core styles
   ========================================================================= */

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

:root {
  /* Color Palette (Transformed to Light Theme) */
  --bg-primary: #f8f9fa;   /* Off-white */
  --bg-secondary: #ffffff; /* Pure white */
  --bg-tertiary: #f1f3f5;  /* Light grey */
  
  --text-primary: #1a1a1a;   /* Dark primary text */
  --text-secondary: #4b5563; /* Medium grey text */
  --text-muted: #6b7280;    /* Muted text */
  
  --accent-primary: #ef4444; /* Vivid Red */
  --accent-secondary: #dc2626; /* Deep Red */
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --accent-glow: rgba(239, 68, 68, 0.15); /* Reduced glow for light theme */

  --border-light: rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Layout */
  --container-width: 1200px;
  --section-padding: 6rem 2rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Environment Stamp */
.env-stamp {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ef4444; /* Vivid Red for awareness */
  color: #ffffff;
  text-align: center;
  padding: 0.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 1px;
  z-index: 9999;
  text-transform: uppercase;
  pointer-events: none; /* Don't block interaction */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* =========================================================================
   Base Styles
   ========================================================================= */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================================================================
   Utility Classes & Components
   ========================================================================= */

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

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--accent-primary);
}

.btn-secondary:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
}

.btn-sm:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--accent-primary);
  border-radius: 20px;
  padding: 2.5rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-secondary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* =========================================================================
   Navigation
   ========================================================================= */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-dot {
  color: var(--accent-primary);
}

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

.nav-logins {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  border-left: 1px solid var(--border-light);
  padding-left: 1.5rem;
  margin-left: -0.5rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--text-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* =========================================================================
   Hero Section
   ========================================================================= */

.hero {
  padding: 12rem 0 6rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Background Glow Effects */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.03) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

.hero::after {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.02) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
  backdrop-filter: blur(5px);
}

.hero h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.hero-image-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  perspective: 1000px;
}

.hero-dashboard-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-light);
  transform: rotateX(5deg) scale(0.95);
  transition: transform var(--transition-slow);
}

.hero-image-wrapper:hover .hero-dashboard-img {
  transform: rotateX(0deg) scale(1);
}

/* =========================================================================
   Stats Section
   ========================================================================= */

.stats {
  padding: 4rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-item p {
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
}

/* =========================================================================
   Ecosystem Products Section
   ========================================================================= */

.ecosystem {
  padding: var(--section-padding);
  position: relative;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.product-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.product-card.product-card-vertical {
  flex-direction: column;
  align-items: flex-start;
}

.product-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
  font-size: 1.75rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.product-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.product-card p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  flex-grow: 1;
}

.product-features {
  margin-bottom: 2rem;
}

.product-features li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-features li::before {
  content: "✓";
  color: var(--accent-primary);
  font-weight: bold;
}

.product-image-container {
  flex: 1;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  height: 350px;
  background: rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  border-radius: 4px;
}

.product-card:hover .product-img {
  transform: scale(1.08);
}

/* Placeholders for screenshots if images are missing */
.product-image-placeholder {
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
}

/* =========================================================================
   Benefits Section
   ========================================================================= */

.benefits {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.benefit-card {
  text-align: left;
  padding: 2rem;
}

.benefit-card h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.benefit-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* =========================================================================
   CTA Section
   ========================================================================= */

.cta {
  padding: 8rem 0;
  text-align: center;
  position: relative;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-tertiary);
  padding: 4rem 2rem;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.cta-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-gradient);
}

.cta-container h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-container p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* =========================================================================
   Footer
   ========================================================================= */

.footer {
  background: var(--bg-tertiary);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-light);
}

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

.footer-about p {
  color: var(--text-secondary);
  margin-top: 1rem;
  font-size: 0.95rem;
  max-width: 300px;
}

.footer-col h4 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

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

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

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* =========================================================================
   Animations (Triggered by JS)
   ========================================================================= */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* =========================================================================
   Responsive Design
   ========================================================================= */

@media (max-width: 1024px) {
  .ecosystem-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Mobile menu logic omitted for brevity, would be full screen overlay */
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero {
    padding: 8rem 0 4rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .product-card {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
