/* ===== ROOT VARIABLES ===== */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --accent: #10b981;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none !important;
  cursor: pointer;
  /* Existing styles */
  transition: transform 0.3s ease;
}

@keyframes text-shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.nav-brand span {
  background: linear-gradient(
    90deg, 
    var(--text-primary) 0%, 
    var(--text-primary) 40%, 
    var(--primary) 50%, 
    var(--accent) 60%, 
    var(--text-primary) 70%, 
    var(--text-primary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; /* Fallback */
  transition: all 0.3s ease;
}

.nav-brand:hover {
  transform: translateY(-1px);
}

.nav-brand:hover span {
  animation: text-shine 3s linear infinite;
}

.nav-brand:visited {
  color: var(--text-primary);
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: var(--primary);
}

/* ===== HERO SECTION ===== */
.hero {
  padding: 120px 0 80px;
  min-height: 100vh;
 display: flex;
  align-items: center;
}

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

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #10b981 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stat i {
  color: var(--accent);
  font-size: 1.2rem;
}

/* ===== BUTTONS ===== */
/* Shared Button Shine Logic */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  z-index: 1;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

/* Spinner Layer (Common) */
.btn::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  z-index: -2;
  border-radius: 10px;
  transition: width 0s, height 0s;
  /* Mask to create border effect */
  -webkit-mask: 
     linear-gradient(#fff 0 0) content-box, 
     linear-gradient(#fff 0 0);
  mask: 
     linear-gradient(#fff 0 0) content-box, 
     linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Background/Inner Layer (Common) */
.btn::after {
  content: '';
  position: absolute;
  inset: 2px; /* Thicker border effect for buttons */
  z-index: -1;
  border-radius: 8px; /* 10px - 2px */
  background: var(--bg-dark); /* Default bg */
  transition: all 0.3s;
}

/* Primary Button Specifics */
.btn-primary {
  color: white;
}
.btn-primary::before {
  background: linear-gradient(135deg, #6366f1, #4f46e5); /* Static bg initially */
}
.btn-primary::after {
  background: linear-gradient(135deg, #6366f1, #4f46e5); /* Fill center */
  inset: 0; /* Full fill initially */
}
/* Hover: Activate Shine */
.btn-primary:hover::after {
  inset: 2px; /* Shrink to create border */
  background: var(--bg-dark); /* Dark center to show text */
}
.btn-primary:hover {
  transform: translateY(-2px);
  color: var(--primary); /* Text becomes colored */
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover::before {
  width: 250%; height: 250%;
  background: conic-gradient(from 0deg, transparent 70%, var(--primary), var(--accent), transparent 100%);
  animation: border-spin 3s linear infinite;
}

/* Secondary & Outline Button Specifics */
.btn-secondary, .btn-outline {
  color: var(--text-primary);
}
.btn-secondary::before, .btn-outline::before {
  background: var(--border); /* Static border */
}

/* Hover: Activate Shine */
.btn-secondary:hover::before, .btn-outline:hover::before {
  width: 250%; height: 250%;
  background: conic-gradient(from 0deg, transparent 70%, var(--primary), var(--accent), transparent 100%);
  animation: border-spin 3s linear infinite;
}

.btn-secondary:hover, .btn-outline:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 60px;
}

/* ===== PRODUCTS SECTION ===== */
.products-section {
  padding: 80px 0;
  background: var(--bg-card);
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.product-card {
  position: relative;
  border-radius: 16px;
  padding: 40px;
  background: transparent; /* Main bg handled by ::after */
  z-index: 1; /* Establish stacking context */
  overflow: hidden;
  border: none; /* We simulate border */
  transition: transform 0.3s, box-shadow 0.3s;
}

/* The Spinning Border Layer (Behind content, behind background) */
.product-card::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* Default State: Static Border Color */
  width: 100%; height: 100%;
  background: var(--border);
  z-index: -2;
  border-radius: 16px;
  transition: width 0s, height 0s; /* Instant switch */
}

/* The Inner Background (Covers the middle) */
.product-card::after {
  content: '';
  position: absolute;
  inset: 1px; /* Creates the 1px border width */
  background: var(--bg-dark);
  border-radius: 15px; /* 16px - 1px */
  z-index: -1;
}

.product-card.featured::after {
  /* Layer gradient ON TOP of solid background to prevent shine bleed-through */
  background: 
    linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.05)),
    var(--bg-dark); 
}

/* Hover State: Spin the Gradient */
.product-card:hover::before {
  width: 250%; height: 250%; /* Grow to cover rotation */
  background: conic-gradient(from 0deg, transparent 70%, var(--primary), var(--accent), transparent 100%);
  animation: border-spin 3s linear infinite;
}

/* Hover Lift */
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px var(--shadow);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px var(--shadow);
  /* border-color removed as it is handled by ::before */
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.product-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.product-icon.groups {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.product-icon.wallet {
  background: linear-gradient(135deg, #10b981, #059669);
}

.product-badge {
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
}

.product-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.product-tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 28px;
}

.product-features {
  list-style: none;
  margin-bottom: 24px;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--text-secondary);
}

.product-features li i {
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.product-use {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.product-use strong {
  color: var(--text-primary);
}

/* ===== FEATURES SECTION ===== */
.features-section {
  padding: 80px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.feature-box {
  position: relative;
  border-radius: 12px;
  padding: 32px;
  background: transparent;
  z-index: 1;
  overflow: hidden;
  border: none;
  transition: transform 0.3s;
}

.feature-box::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  background: var(--border);
  z-index: -2;
  border-radius: 12px;
  transition: width 0s, height 0s;
}

.feature-box::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--bg-card);
  border-radius: 11px;
  z-index: -1;
}

.feature-box:hover::before {
  width: 250%; height: 250%;
  background: conic-gradient(from 0deg, transparent 70%, var(--primary), var(--accent), transparent 100%);
  animation: border-spin 3s linear infinite;
}

.feature-box:hover {
  transform: translateY(-4px);
}

.feature-box:hover {
  transform: translateY(-4px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.feature-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-box p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== DOWNLOAD SECTION ===== */
.download-section {
  padding: 80px 0;
  background: var(--bg-card);
}

.download-box {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 60px 40px;
}

.download-box h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.download-box > p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 40px;
}

.download-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.store-button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s;
  min-width: 180px;
  position: relative;
  overflow: hidden;
}

@keyframes shine-loop {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

@keyframes border-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.store-button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(135deg, transparent 0%, rgba(99, 102, 241, 0.3) 45%, rgba(16, 185, 129, 0.3) 55%, transparent 100%);
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
}

.store-button:hover::before {
  animation: shine-loop 1.5s infinite;
}

.store-button:hover:not(.disabled) {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.store-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.store-button i {
  font-size: 2.25rem;
  position: relative;
  z-index: 1;
}

.store-button div {
  text-align: left;
  position: relative;
  z-index: 1;
}

.store-button small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.store-button strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
}

.download-info {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== ABOUT SECTION ===== */
.about-section {
  padding: 80px 0;
}

.about-box {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.about-box h2 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}

.about-text {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

.tech-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.tech-badges span {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* ===== FOOTER ===== */
.footer {
  padding: 40px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .products-container {
    grid-template-columns: 1fr;
  }
  
  .product-card {
    padding: 32px 24px;
  }
  
  .nav-menu {
    gap: 20px;
    font-size: 0.9rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .download-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .product-card,
  .download-box {
    padding: 24px 20px;
  }
  
  .nav-menu {
    gap: 16px;
  }
  
  .nav-menu a {
    font-size: 0.85rem;
  }
}
