/**
 * 7xeh.Dev - Home Page Styles
 * Modern glassmorphism design with animated backgrounds
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark light;
  --bg: #09090b;
  --bg-soft: #0c0e14;
  --bg-card: #12141d;
  --text: #f4f4f5;
  --text-secondary: #a1a1aa;
  --muted: #71717a;
  --brand: #a855f7;
  --brand-glow: rgba(168, 85, 247, 0.5);
  --brand-soft: rgba(168, 85, 247, 0.15);
  --accent: #7c3aed;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(168, 85, 247, 0.4);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(168, 85, 247, 0.15);
  --radius: 16px;
  --radius-lg: 24px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --bg-soft: #f4f4f5;
    --bg-card: #ffffff;
    --text: #18181b;
    --text-secondary: #52525b;
    --muted: #a1a1aa;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated mesh gradient background */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-mesh::before,
.bg-mesh::after {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background: 
    radial-gradient(ellipse 600px 600px at 20% 20%, rgba(168, 85, 247, 0.15), transparent 50%),
    radial-gradient(ellipse 500px 500px at 80% 20%, rgba(124, 58, 237, 0.12), transparent 50%),
    radial-gradient(ellipse 700px 700px at 40% 80%, rgba(168, 85, 247, 0.1), transparent 50%),
    radial-gradient(ellipse 400px 400px at 90% 80%, rgba(124, 58, 237, 0.15), transparent 50%);
  animation: meshMove 25s ease-in-out infinite alternate;
}

.bg-mesh::after {
  animation-delay: -12s;
  animation-direction: alternate-reverse;
  opacity: 0.7;
}

@keyframes meshMove {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(3%, -3%) rotate(2deg) scale(1.02); }
  50% { transform: translate(-2%, 2%) rotate(-1deg) scale(0.98); }
  75% { transform: translate(2%, 3%) rotate(1deg) scale(1.01); }
  100% { transform: translate(-3%, -2%) rotate(-2deg) scale(1); }
}

/* Grid overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

/* Content wrapper */
.content {
  position: relative;
  z-index: 1;
}

/* Links */
a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(9, 9, 11, 0.9);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.nav-logo span {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.nav-link.primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 20px var(--brand-glow);
}

.nav-link.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--brand-glow);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 100px;
  text-align: center;
}

.hero-content {
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease forwards;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 28px;
  letter-spacing: -2px;
  animation: fadeInUp 0.6s ease 0.1s forwards;
  opacity: 0;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid var(--border);
  font-family: inherit;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 30px var(--brand-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 50px var(--brand-glow);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Scroll indicator */
.scroll-indicator {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  animation: bounce 2.5s infinite;
}

.scroll-indicator span {
  display: block;
  width: 28px;
  height: 28px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.scroll-indicator:hover span {
  opacity: 0.8;
  border-color: var(--brand);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-12px); }
  60% { transform: translateY(-6px); }
}

/* Sections */
.section {
  padding: 100px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.section-header h2 .gradient {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: rgba(18, 20, 29, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow), var(--shadow);
  text-decoration: none;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--brand-soft);
  border: 1px solid rgba(168, 85, 247, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  color: var(--brand);
}

.feature-icon i {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 30px var(--brand-glow);
}

.feature-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}

.feature-link::after {
  content: '→';
  transition: transform 0.2s ease;
}

.feature-card:hover .feature-link::after {
  transform: translateX(4px);
}

/* Stats Section */
.stats-section {
  padding: 80px 24px;
  background: linear-gradient(180deg, transparent, rgba(168, 85, 247, 0.03), transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.stat-card {
  text-align: center;
  padding: 32px 24px;
  background: rgba(18, 20, 29, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* Apps Section */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.app-card {
  background: rgba(18, 20, 29, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow);
  text-decoration: none;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 24px var(--brand-glow);
  color: #fff;
}

.app-icon i {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

/* Button icons */
.btn-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.app-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.app-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

.app-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  width: fit-content;
}

/* CTA Section */
.cta-section {
  padding: 120px 24px;
  text-align: center;
}

.cta-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(124, 58, 237, 0.05));
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.15), transparent 60%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
  position: relative;
}

.cta-card p {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 36px;
  position: relative;
}

.cta-card .hero-buttons {
  position: relative;
}

/* Footer */
.footer {
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--brand);
  text-decoration: none;
}

.footer-copy {
  color: var(--muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 12px 16px;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.98);
    backdrop-filter: blur(20px);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 8px;
    display: none;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-link {
    width: 100%;
    text-align: center;
    padding: 14px 18px;
  }
  
  .hero {
    padding: 120px 20px 80px;
  }
  
  .section {
    padding: 80px 20px;
  }
  
  .apps-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .cta-card {
    padding: 40px 24px;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
    letter-spacing: -1px;
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .feature-card {
    padding: 28px;
  }
  
  .stat-value {
    font-size: 2.25rem;
  }
}

/* Light mode adjustments */
@media (prefers-color-scheme: light) {
  .nav {
    background: rgba(250, 250, 250, 0.8);
  }
  
  .nav.scrolled {
    background: rgba(250, 250, 250, 0.95);
  }
  
  .feature-card,
  .app-card,
  .stat-card {
    background: rgba(255, 255, 255, 0.8);
  }
  
  .bg-mesh::before,
  .bg-mesh::after {
    opacity: 0.4;
  }
}
