/* CSS Variables & Custom Properties */
:root {
  --background: hsl(240 10% 3.9%);
  --foreground: hsl(0 0% 98%);
  --card: hsl(240 10% 3.9%);
  --card-foreground: hsl(0 0% 98%);
  --popover: hsl(240 10% 3.9%);
  --popover-foreground: hsl(0 0% 98%);
  --primary: hsl(0 0% 98%);
  --primary-foreground: hsl(240 5.9% 10%);
  --secondary: hsl(240 3.7% 15.9%);
  --secondary-foreground: hsl(0 0% 98%);
  --muted: hsl(240 3.7% 15.9%);
  --muted-foreground: hsl(240 5% 64.9%);
  --accent: hsl(240 3.7% 15.9%);
  --accent-foreground: hsl(0 0% 98%);
  --destructive: hsl(0 62.8% 30.6%);
  --destructive-foreground: hsl(0 0% 98%);
  --border: hsl(240 3.7% 15.9%);
  --input: hsl(240 3.7% 15.9%);
  --ring: hsl(240 4.9% 83.9%);
  --radius: 0.75rem;
  --glow-purple: #9b87f5;
  --glow-blue: #33C3F0;
  --glow-gradient: linear-gradient(90deg, var(--glow-purple) 0%, var(--glow-blue) 100%);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px; /* xl */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem; /* px-4 */
  padding-right: 1rem; /* px-4 */
}

@media (min-width: 640px) { /* sm */
  .container {
    padding-left: 2rem; /* sm:px-8 */
    padding-right: 2rem;
  }
}

/* Custom Text Gradient */
.text-gradient {
  background: var(--glow-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-hero {
    background: linear-gradient(to right, #FFFFFF, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Header Scroll Effect */
#main-header {
  transition: background-color 0.3s ease-out, box-shadow 0.3s ease-out;
}
#main-header.scrolled {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Why Creonix Section */
.benefit-card-v2 {
  background: linear-gradient(145deg, hsl(240 3.7% 11.9%), hsl(240 4% 8.9%));
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  border-radius: 1rem; /* rounded-xl */
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card-v2:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04), 0 0 30px -10px rgba(155, 135, 245, 0.2);
}


/* Community Section */
.community-benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.benefit-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.5rem; /* h-14 */
  width: 3.5rem; /* w-14 */
  border-radius: 50%;
  background-color: rgba(155, 135, 245, 0.1); /* purple-500/10 */
  border: 1px solid rgba(155, 135, 245, 0.2);
  color: var(--glow-purple);
}

/* FAQ Accordion */
#faq .faq-item {
  background-color: hsl(240 3.7% 11.9%);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: background-color 0.2s ease;
}
#faq .faq-item:hover {
    background-color: hsl(240 3.7% 13.9%);
}
#faq .faq-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  color: var(--foreground);
}
#faq .faq-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
  color: var(--muted-foreground);
}
#faq .faq-trigger[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: var(--glow-purple);
}
#faq .faq-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1.0), padding 0.4s cubic-bezier(0.25, 0.1, 0.25, 1.0);
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1.6;
}
#faq .faq-content p {
    padding: 0 1.5rem 1.25rem 1.5rem;
}

/* --- ISOLATED BUTTON STYLES --- */
/* Primary Gradient Button (for main CTAs) */
a.btn-gradient-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem; /* py-3.5 px-8 */
  font-size: 1rem; /* text-base */
  font-weight: 600; /* font-semibold */
  color: white;
  background: linear-gradient(90deg, var(--glow-purple) 0%, var(--glow-blue) 100%);
  border-radius: 0.5rem; /* rounded-lg */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

a.btn-gradient-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px 5px rgba(155, 135, 245, 0.3);
}

/* Secondary Gradient Button (for header) */
a.btn-gradient-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem; /* py-2 px-4 */
  font-size: 0.875rem; /* text-sm */
  font-weight: 600; /* font-semibold */
  color: white;
  background: linear-gradient(90deg, var(--glow-purple) 0%, var(--glow-blue) 100%);
  border-radius: 0.5rem; /* rounded-lg */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

a.btn-gradient-secondary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px 2px rgba(155, 135, 245, 0.2);
}


/* Final CTA */
#final-cta .btn-gradient-primary:hover, #hero .hero-cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px 5px rgba(155, 135, 245, 0.4);
}

/* Animations */
@keyframes fade-in {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* How It Works - Tabs Section */
.viral-tabs__button {
  background-color: transparent;
  border: 1px solid hsl(240 3.7% 15.9%);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.viral-tabs__button:hover {
  background-color: hsl(240 3.7% 15.9%);
}

.viral-tabs__button.is-active {
  background-color: hsl(240 3.7% 15.9%);
  border-color: var(--glow-purple);
}

.viral-tabs__content {
  display: none;
  animation: fade-in 0.5s ease-in-out;
}

.viral-tabs__content.is-active {
  display: block;
}

#how-it-works .visual-placeholder {
  background-color: hsl(240 3.7% 15.9%);
  border: 1px solid hsl(240 3.7% 15.9%);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-top: 1rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#how-it-works .visual-placeholder .desc {
  color: hsl(240 5% 64.9%);
  font-size: 0.875rem;
  margin-top: 1rem;
  text-align: center;
}

/* Hero Video Player */
.video-player-wrapper {
  position: relative;
  max-width: 560px;
  margin: auto;
}

#hero .hero-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(155, 135, 245, 0.15) 0%, rgba(155, 135, 245, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.video-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.play-button {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.2s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.play-button:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.2);
}

.play-button svg {
  width: 32px;
  height: 32px;
  margin-left: 4px; /* Optical alignment for play icon */
}

.demo-text {
  margin-top: 1.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Responsive adjustments for "How It Works" section */
@media (max-width: 1023px) {
  .viral-tabs__button {
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .viral-tabs__button::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
  }

  .viral-tabs__button.is-active::after {
    transform: rotate(45deg);
  }

  .viral-tabs__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 1rem;
  }

  .viral-tabs__content.is-active {
    max-height: 500px; /* Adjust as needed */
    padding: 1.5rem 1rem;
  }
}

/* General Mobile Typography and Spacing Refinements */
@media (max-width: 767px) {
  /* Hero Section */
  #hero h1 {
    font-size: 2.5rem; /* 40px */
    line-height: 1.1;
  }
  #hero h2 {
    font-size: 1.875rem; /* 30px */
    line-height: 1.2;
  }
  #hero .hero-text-content {
    /* Reduce top margin slightly if needed, assuming it's part of the parent flex layout */
  }

  /* Core Features & Other Sections */
  section h2 {
    font-size: 2.25rem; /* 36px */
    line-height: 1.2;
  }

  #features .grid,
  #proof .grid {
    gap: 3rem; /* Reduce gap between items */
  }

  /* Reduce padding on sections for smaller screens */
  section.py-24 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  section.py-16 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Final CTA */
  #final-cta {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}
