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

/* --- DESIGN TOKENS & SYSTEM --- */
:root {
  /* Common Core Colors */
  --bg-dark: #08070b;
  --bg-surface-rgb: 15, 14, 22;
  --border-color: rgba(255, 255, 255, 0.07);
  --text-primary: #ffffff;
  --text-secondary: #a19eb1;
  --text-muted: #646275;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Music Theme (Default) */
  --accent-music: #8b5cf6;
  --accent-music-glow: rgba(139, 92, 246, 0.28);
  --accent-music-border: rgba(139, 92, 246, 0.3);
  --gradient-music: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  
  /* Photos Theme */
  --accent-photos: #10b981;
  --accent-photos-glow: rgba(16, 185, 129, 0.28);
  --accent-photos-border: rgba(16, 185, 129, 0.3);
  --gradient-photos: linear-gradient(135deg, #34d399 0%, #059669 100%);

  /* Default Active States (Music Mode) */
  --accent: var(--accent-music);
  --accent-glow: var(--accent-music-glow);
  --accent-border: var(--accent-music-border);
  --accent-gradient: var(--gradient-music);
  
  --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-medium: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* --- THEME TOGGLE OVERRIDES --- */
body.photos-mode {
  --accent: var(--accent-photos);
  --accent-glow: var(--accent-photos-glow);
  --accent-border: var(--accent-photos-border);
  --accent-gradient: var(--gradient-photos);
}

/* --- RESET & BASIC SETUP --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  background-color: var(--bg-dark);
}

body {
  background-color: transparent;
  position: relative;
  isolation: isolate;
  font-family: var(--font-sans);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  scroll-behavior: smooth;
  transition: background-color var(--transition-slow);
}

/* --- GLOWING BACKGROUND BLOBS --- */
.ambient-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

/* Premium Vercel-style spotlight background grid */
.ambient-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  mask-image: radial-gradient(circle at 50% 25%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 25%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
  transition: background-image var(--transition-slow);
}

body.light-mode .ambient-background::before {
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.012) 1px, transparent 1px);
  mask-image: radial-gradient(circle at 50% 25%, black 15%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 25%, black 15%, transparent 70%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.8;
  mix-blend-mode: screen;
  transition: var(--transition-slow);
  z-index: 0;
}

/* Slow, organic drifting background motion to eliminate layout empty voids */
@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(4%, 6%) scale(1.08);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes drift-reverse {
  0% {
    transform: translate(0, 0) scale(1.04);
  }
  50% {
    transform: translate(-3%, -5%) scale(0.96);
  }
  100% {
    transform: translate(0, 0) scale(1.04);
  }
}

.blob-1 {
  top: -10%;
  left: 15%;
  width: 45vw;
  height: 45vw;
  background: var(--accent-glow);
  animation: drift 28s infinite alternate ease-in-out;
}

.blob-2 {
  top: 40%;
  right: -5%;
  width: 40vw;
  height: 40vw;
  background: rgba(124, 58, 237, 0.05);
  animation: drift-reverse 32s infinite alternate ease-in-out;
}

body.photos-mode .blob-2 {
  background: rgba(5, 150, 105, 0.05);
}

/* --- INTERACTIVE CONTAINER --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* --- FLOATING HEADER --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  transition: var(--transition-medium);
}

.header-glass {
  background: rgba(var(--bg-surface-rgb), 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  transition: border-color var(--transition-slow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- SLEEK BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-medium);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #000000;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 14px rgba(var(--bg-surface-rgb), 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

.btn-primary svg {
  fill: currentColor;
}

/* --- HERO SECTION --- */
.hero {
  text-align: center;
  padding: 80px 0 40px;
}

.badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  transition: background-color var(--transition-slow);
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.hero h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--transition-slow);
}

.hero-subtitle {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-actions .btn-primary {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: 14px;
}

/* --- DOWNLOAD TRACKER COUNTER --- */
.download-counter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.download-counter-wrap.visible {
  opacity: 1;
  transform: translateY(0);
}

.counter-glow {
  color: var(--accent);
  font-weight: 700;
  transition: color var(--transition-slow);
}

/* --- SEGMENTED TABS SWITCHER --- */
.mode-selector {
  display: flex;
  justify-content: center;
  margin: 40px 0 60px;
}

.tabs-wrapper {
  background: rgba(var(--bg-surface-rgb), 0.8);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: 16px;
  display: flex;
  gap: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-medium);
}

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

.tab-btn.active {
  color: #000000;
  background: var(--accent-gradient);
  box-shadow: 0 4px 12px rgba(var(--bg-surface-rgb), 0.5);
}

/* --- DYNAMIC PREVIEW APP SHOWCASE --- */
.preview-showcase {
  margin-bottom: 80px;
}

.glass-card {
  background: rgba(var(--bg-surface-rgb), 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color var(--transition-slow);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mode-content {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  animation: var(--transition-medium) forwards;
}

body.music-mode .mode-content.music-only {
  display: block;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.photos-mode .mode-content.photos-only {
  display: block;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preview-info h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.preview-info p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.features-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
}

.features-list li svg {
  color: var(--accent);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: color var(--transition-slow);
}

.features-list li span strong {
  color: var(--text-primary);
}

.features-list li span {
  color: var(--text-secondary);
}

/* --- REALTIME APPLICATION MOCKUP (INTERACTIVE) --- */
.mockup-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.app-screenshot-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  border-radius: 18px;
  background: #0d0c11;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.05);
  overflow: hidden;
  transition: border-color var(--transition-slow), box-shadow var(--transition-slow);
}

body.photos-mode .app-screenshot-wrapper {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(16, 185, 129, 0.05);
}

.screenshot-img {
  width: 100%;
  height: auto;
  display: none;
  opacity: 0;
  border-radius: 17px;
  transition: opacity var(--transition-medium);
}

/* Toggle displays gracefully based on active theme */
body.music-mode .music-only-img {
  display: block;
  opacity: 1;
  animation: fadeIn 0.4s ease-out forwards;
}

body.photos-mode .photos-only-img {
  display: block;
  opacity: 1;
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- THE THREE PILLARS (BENEFITS) --- */
.benefits {
  padding: 40px 0 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.benefit-card {
  background: rgba(var(--bg-surface-rgb), 0.3);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  transition: var(--transition-medium);
}

.benefit-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(var(--bg-surface-rgb), 0.5);
}

.benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent);
  transition: color var(--transition-slow);
}

.benefit-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.benefit-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- GITHUB TRANSPARENCY SECTION --- */
.github-transparency {
  margin-bottom: 100px;
}

.github-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(20, 18, 30, 0.4) 100%);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
}

body.photos-mode .github-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(20, 18, 30, 0.4) 100%);
}

.github-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: var(--accent-glow);
  filter: blur(80px);
  border-radius: 50%;
  pointer-events: none;
  transition: var(--transition-slow);
}

.github-content {
  max-width: 600px;
}

.github-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.github-content p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* --- FOOTER --- */
footer {
  border-top: 1px solid var(--border-color);
  padding: 60px 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.bervos-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.bervos-logo-link:hover {
  transform: scale(1.05);
}

.bervos-logo {
  width: 90px;
  height: auto;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.bervos-logo:hover {
  opacity: 1;
}

.footer-text {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-text a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 44px;
  }
  
  .preview-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .app-mockup {
    margin: 0 auto;
  }
  
  .benefits {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .github-banner {
    flex-direction: column;
    text-align: center;
    gap: 32px;
    padding: 36px 24px;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 36px;
    letter-spacing: -1px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .glass-card {
    padding: 24px 16px;
  }
  
  .tab-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .header-glass {
    padding: 10px 16px;
  }
  
  .brand-name {
    font-size: 16px;
  }
}

.hidden {
  display: none !important;
}

.app-version-info {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.2px;
  margin-top: 10px;
}

/* --- LIGHT MODE STYLING --- */
body.light-mode {
  --bg-dark: #f8f7fa;
  --bg-surface-rgb: 255, 255, 255;
  --border-color: rgba(0, 0, 0, 0.08);
  --text-primary: #0f0e13;
  --text-secondary: #5a576b;
  --text-muted: #8c89a0;
  
  --accent-music-glow: rgba(139, 92, 246, 0.06);
  --accent-music-border: rgba(139, 92, 246, 0.2);
  --accent-photos-glow: rgba(16, 185, 129, 0.06);
  --accent-photos-border: rgba(16, 185, 129, 0.2);
}

body.light-mode .blob-1 {
  opacity: 0.45;
}
body.light-mode .blob-2 {
  opacity: 0.45;
}

body.light-mode .app-screenshot-wrapper {
  background: #fcfcfd;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 30px rgba(139, 92, 246, 0.03);
}

body.light-mode.photos-mode .app-screenshot-wrapper {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 30px rgba(16, 185, 129, 0.03);
}

body.light-mode .btn-secondary {
  background: rgba(0, 0, 0, 0.03);
  color: #0f0e13;
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.18);
}

body.light-mode .tab-btn {
  color: #5a576b;
}

body.light-mode .tab-btn:hover {
  color: #0f0e13;
}

body.light-mode .tab-btn.active {
  color: #ffffff;
}

body.light-mode .chart-progress-bg {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .persona-avatar {
  color: #ffffff;
}

/* Icon transitions inside theme switcher */
#theme-toggle .sun-icon,
#theme-toggle .moon-icon {
  transition: transform var(--transition-fast);
}

#theme-toggle:hover .sun-icon,
#theme-toggle:hover .moon-icon {
  transform: rotate(20deg) scale(1.1);
}

/* --- LIGHT MODE VISUAL AESTHETIC REFINEMENTS --- */
body.light-mode .bervos-logo {
  filter: invert(1) brightness(0.15) opacity(0.8);
  transition: filter var(--transition-fast), opacity var(--transition-fast);
}

body.light-mode .bervos-logo:hover {
  filter: invert(1) brightness(0.05) opacity(1);
}

body.light-mode .badge {
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.07);
  color: var(--text-secondary);
}

body.light-mode .github-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.04) 0%, rgba(255, 255, 255, 0.7) 100%);
  border-color: rgba(139, 92, 246, 0.12);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.02);
}

body.light-mode.photos-mode .github-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, rgba(255, 255, 255, 0.7) 100%);
  border-color: rgba(16, 185, 129, 0.12);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.02);
}

body.light-mode .github-banner .btn-secondary {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.02);
  color: #0f0e13;
}

body.light-mode .github-banner .btn-secondary:hover {
  background: #fafafa;
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

body.light-mode .benefit-card {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

body.light-mode .benefit-card:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
}

body.light-mode .benefit-icon {
  background: var(--accent-glow);
}


body.light-mode .glass-card {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* --- PREMIUM BUTTON SVG COMPATIBILITY --- */
.btn svg {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  transition: transform var(--transition-fast);
}

.hero-actions .btn-primary svg {
  width: 20px;
  height: 20px;
}
