/**
 * SYD Platform - Component Styles
 * Slack-inspired components
 */

/* ================================
   HEADER & NAVIGATION
   ================================ */
.header {
  position: sticky;
  top: 0;
  background: rgba(26, 29, 33, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: var(--z-sticky);
  padding: var(--space-sm) 0;
}

.nav-link {
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
  transition: color var(--transition-fast);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
}

.nav-link:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-hover);
}

.menu-toggle {
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  cursor: pointer;
  padding: var(--space-xs);
}

/* ================================
   HERO SECTION
   ================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-4xl) 0;
  background: var(--color-bg-primary);
  z-index: 0;
}

/* Reusable grid background pattern (matches SharedTruth .st-atm-grid) */
.bg-grid {
  position: relative;
  z-index: 0;
}
.bg-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255,255,255,1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,1) 1px, transparent 1px);
  background-size: 64px 64px;
  z-index: -1;
}

.hero-title {
  margin-bottom: var(--space-lg);
  line-height: 1.05;
  letter-spacing: -0.02em;
  /* animation: fadeIn 0.8s ease; - Removed for static appearance */
}

.text-gradient {
  background: linear-gradient(92deg, #00E5FF 0%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================================
   BENEFIT CARDS
   ================================ */
.benefits {
  margin-top: calc(var(--space-3xl) * -1);
  position: relative;
  z-index: 10;
  padding-bottom: var(--space-3xl);
}

.benefit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(20,20,26,0.7) 0%, rgba(12,12,16,0.85) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0,229,255,0.18);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), border-color 0.4s ease;
  overflow: visible;
}
.benefit-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  background: linear-gradient(135deg, rgba(0,229,255,0.25), rgba(124,58,237,0.18));
  filter: blur(20px);
  z-index: -1;
}
.benefit-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(0,229,255,0.5);
}
.benefit-card:hover::before { opacity: 1; }

.benefit-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(124,58,237,0.28);
  background: rgba(124,58,237,0.07);
  margin-bottom: 16px;
  align-self: flex-start;
}
.benefit-badge .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7C3AED;
  box-shadow: 0 0 8px rgba(124,58,237,0.75);
  animation: pulse-dot 2s ease-in-out infinite;
}
.benefit-badge .label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #A78BFA;
  font-weight: 700;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.benefit-role {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 12px;
}
.benefit-title {
  color: #fff;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  font-size: 22px;
}
.benefit-body {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

/* ================================
   DEMO SECTION
   ================================ */
.demo {
  background: var(--color-bg-primary);
  position: relative;
}

.demo-container {
  box-shadow: 0 50px 100px rgba(0,0,0,0.5);
  border: 1px solid var(--color-border);
}

.demo-container:hover {
  transform: none;
}

/* ================================
   PRODUCT CARDS
   ================================ */
.products {
  background: var(--color-bg-primary);
}

.product-card {
  position: relative;
  /* SharedTruth chassis — override .card defaults */
  background: linear-gradient(165deg, rgba(20,20,26,0.7) 0%, rgba(12,12,16,0.85) 100%) !important;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0,229,255,0.18) !important;
  border-radius: 16px !important;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), border-color 0.4s ease !important;
  overflow: visible;
}
.product-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  background: linear-gradient(135deg, rgba(0,229,255,0.25), rgba(124,58,237,0.18));
  filter: blur(20px);
  z-index: -1;
}
.product-card:hover {
  transform: translateY(-6px) scale(1.02) !important;
  border-color: rgba(0,229,255,0.5) !important;
}
.product-card:hover::before { opacity: 1; }

.product-card.featured {
  border-color: rgba(0,229,255,0.5) !important;
  box-shadow: 0 0 0 1px var(--color-accent), 0 30px 70px -20px rgba(0,0,0,0.7);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-bg-primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
}

.product-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  margin: var(--space-md) 0;
}

.product-features {
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.product-features li {
  padding: var(--space-xs) 0;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* ================================
   NETWORK SECTION
   ================================ */
.network {
  background: var(--color-bg-primary);
  position: relative;
}

.stat {
  text-align: center;
  padding: var(--space-md);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.placeholder-visual {
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-elevated) 100%);
  border: 2px dashed var(--color-border);
}

/* ================================
   CTA SECTION
   ================================ */
.cta {
  background: var(--color-bg-primary);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  opacity: 0.05;
  pointer-events: none;
}

/* ================================
   FOOTER
   ================================ */
.footer {
  background: var(--color-bg-secondary);
  padding: var(--space-3xl) 0 var(--space-2xl);
  /* margin-top removed: was 128px and stacked on top of cta padding-bottom 96px,
     creating a 264px gap (cta-content → footer-content). Now the footer relies
     only on the previous section's padding-bottom for vertical rhythm. */
}

.footer-links ul {
  list-style: none;
  margin-top: var(--space-sm);
}

.footer-links li {
  padding: var(--space-xs) 0;
}

.footer-links a {
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-text-primary);
}

/* ================================
   MOBILE RESPONSIVE
   ================================ */
@media (max-width: 768px) {
  .hero {
    padding: var(--space-3xl) 0;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .benefits {
    margin-top: 0;
    padding-top: var(--space-2xl);
  }

  .network-content {
    grid-template-columns: 1fr;
  }

  .network-visual {
    display: none;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .cta-actions {
    flex-direction: column;
  }

  .cta-actions .btn {
    width: 100%;
  }
}

/* ================================
   ANIMATIONS & INTERACTIONS
   ================================ */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Selection color */
::selection {
  background: var(--color-accent);
  color: var(--color-bg-primary);
}

/* Focus states for accessibility */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Loading animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.loading {
  background: linear-gradient(
    90deg,
    var(--color-bg-secondary) 0%,
    var(--color-bg-elevated) 50%,
    var(--color-bg-secondary) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Hover lift effect for all cards */
.card {
  transform: translateY(0);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
}

/* Micro-interactions */
.badge {
  /* animation: fadeIn 0.6s ease; - Removed for static appearance */
}

h1, h2, h3 {
  /* animation: fadeIn 0.8s ease; - Removed for static appearance */
}

p {
  /* animation: fadeIn 1s ease; - Removed for static appearance */
}

/* Mobile menu (we'll add JS later) */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background: var(--color-bg-secondary);
  z-index: var(--z-modal);
  transition: right var(--transition-base);
  padding: var(--space-xl);
}

.mobile-menu.open {
  right: 0;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-overlay);
  display: none;
}

.mobile-overlay.open {
  display: block;
}

/* Language switcher (header desktop + mobile menu) */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-switcher .lang-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.lang-switcher .lang-btn:hover {
  color: rgba(255, 255, 255, 0.85);
}

.lang-switcher .lang-btn.active {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
}

.lang-switcher .lang-sep {
  color: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  pointer-events: none;
}

/* Mobile menu version: full-width row, slightly bigger */
.mobile-nav .lang-switcher {
  align-self: center;
  padding: 6px 12px;
}

.mobile-nav .lang-switcher .lang-btn {
  font-size: 13px;
  padding: 6px 12px;
}