/* ==========================================================================
   ShareHear — Enterprise Design System (UI/UX Pro Max)
   Color tokens grounded in Logo Identity: Indigo (#6366F1), Cyan (#06B6D4), 
   Sky (#38BDF8), Accent (#818CF8), Midnight (#0F172A), Deep (#0B0F19)
   ========================================================================== */

:root {
  /* Core Brand Colors */
  --color-primary: #6366F1;
  --color-primary-dark: #4F46E5;
  --color-primary-light: #818CF8;
  --color-cyan: #06B6D4;
  --color-cyan-light: #38BDF8;
  --color-cyan-bright: #22D3EE;
  
  /* Surfaces & Backgrounds */
  --bg-deep: #0B0F19;
  --bg-surface: #0F172A;
  --bg-card: #131D31;
  --bg-card-hover: #17233B;
  --bg-card-active: #1C2B47;
  
  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-brand: rgba(99, 102, 241, 0.25);
  --border-cyan: rgba(6, 182, 212, 0.3);
  --border-highlight: rgba(255, 255, 255, 0.15);
  
  /* Typography Colors */
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --text-cyan: #38BDF8;
  
  /* Status */
  --color-success: #10B981;
  --color-success-bg: rgba(16, 185, 129, 0.12);
  --color-warning: #F59E0B;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow-indigo: 0 0 35px -5px rgba(99, 102, 241, 0.35);
  --shadow-glow-cyan: 0 0 35px -5px rgba(6, 182, 212, 0.35);
}

/* Base Styles & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-deep);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Ambient Background Glows */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  pointer-events: none;
}

.glow-top-center {
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, #6366F1 0%, #06B6D4 50%, transparent 80%);
}

.glow-middle-right {
  top: 35%;
  right: -200px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #06B6D4 0%, #4F46E5 50%, transparent 80%);
  opacity: 0.18;
}

.glow-bottom-left {
  bottom: 10%;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #6366F1 0%, #818CF8 50%, transparent 80%);
  opacity: 0.15;
}

/* Layout Utilities */
.max-w-7xl {
  max-width: 80rem;
}

.max-w-5xl {
  max-width: 64rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-sm {
  max-width: 24rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }
.pt-12 { padding-top: 3rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-20 { padding-bottom: 5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

.space-x-1 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.25rem; }

/* Grid & Flex */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-3\.5 { gap: 0.875rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.shrink-0 { flex-shrink: 0; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:p-8 { padding: 2rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:text-sm { font-size: 0.875rem; }
  .sm\:text-lg { font-size: 1.125rem; }
  .sm\:text-xl { font-size: 1.25rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1; }
  .sm\:w-auto { width: auto; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:pt-20 { padding-top: 5rem; }
  .md\:pb-32 { padding-bottom: 8rem; }
}

@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1.1; }
}

/* Surface Cards & Panels */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card-interactive:hover {
  transform: translateY(-4px);
  border-color: var(--border-brand);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7), var(--shadow-glow-indigo);
}

.card-glow-indicator {
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
  opacity: 0.6;
}

.glass-panel {
  background: rgba(19, 29, 49, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-brand);
}

/* Buttons & CTAs */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4F46E5 0%, #4338CA 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
  color: #FFFFFF;
}

.btn-cyan {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
  color: #0F172A;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-cyan:hover {
  background: linear-gradient(135deg, #22D3EE 0%, #06B6D4 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.5);
  color: #0F172A;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background-color: var(--bg-surface);
  color: #F8FAFC;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid var(--border-brand);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--bg-card);
  border-color: var(--color-cyan);
  color: var(--color-cyan-light);
  transform: translateY(-1px);
}

.btn-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  color: var(--color-cyan-light);
  border-color: var(--border-cyan);
  background: var(--bg-card);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.badge-indigo {
  background-color: rgba(99, 102, 241, 0.15);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.badge-cyan {
  background-color: rgba(6, 182, 212, 0.15);
  color: #67E8F9;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

/* Typography styles */
h1, h2, h3, h4 {
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
}

.text-transparent {
  color: transparent;
}

.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-cyan-400 {
  --tw-gradient-from: #22D3EE;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(34, 211, 238, 0));
}

.via-indigo-300 {
  --tw-gradient-stops: var(--tw-gradient-from), #A5B4FC, var(--tw-gradient-to, rgba(165, 180, 252, 0));
}

.to-indigo-400 {
  --tw-gradient-to: #818CF8;
}

.to-indigo-500 {
  --tw-gradient-to: #6366F1;
}

/* Navigation Links */
.nav-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding: 0.25rem 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-primary));
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Interactive Tabs */
.tab-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-active {
  background: var(--bg-card);
  color: var(--color-cyan-light) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-cyan);
}

/* Animated Equalizer */
.eq-bar {
  width: 4px;
  border-radius: 2px;
  animation: bounce 1.2s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1) { animation-delay: 0.1s; animation-duration: 0.9s; }
.eq-bar:nth-child(2) { animation-delay: 0.4s; animation-duration: 1.3s; }
.eq-bar:nth-child(3) { animation-delay: 0.2s; animation-duration: 0.8s; }
.eq-bar:nth-child(4) { animation-delay: 0.6s; animation-duration: 1.1s; }
.eq-bar:nth-child(5) { animation-delay: 0.3s; animation-duration: 1.4s; }
.eq-bar:nth-child(6) { animation-delay: 0.5s; animation-duration: 1.0s; }
.eq-bar:nth-child(7) { animation-delay: 0.2s; animation-duration: 1.2s; }

@keyframes bounce {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.0); }
}

/* FAQ Accordion */
.faq-item {
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.faq-item:hover {
  border-color: var(--border-brand);
}

.faq-item.is-open {
  border-color: var(--border-cyan);
  background-color: var(--bg-card-hover);
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
  color: var(--color-cyan-bright);
}

/* Focus States for Keyboard Navigation */
:focus-visible, .focus-ring:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
}

/* Reduced Motion Mode */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
