/* Base styles - shadcn-inspired design system */
:root {
  /* Core colors */
  --primary-color: #FF4500; /* Reddit Orange */
  --secondary-color: #ef4444; /* Red 500 */
  --accent-color: #f97316; /* Orange 500 */

  /* Semantic colors - shadcn style */
  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --card-foreground: #0a0a0a;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --border: #e5e5e5;
  --ring: #FF4500;

  /* Legacy mappings */
  --text-color: var(--foreground);
  --light-color: var(--background);
  --dark-color: var(--foreground);
  --gray-color: var(--muted);
  --medium-gray: var(--muted-foreground);
  --light-gray: #fafafa;
  --border-color: var(--border);
  --light-bg: #fafafa;

  /* Refined shadows - softer, more subtle */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);

  /* Border radius */
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --rounded-xl: 0.75rem;
  --rounded-full: 9999px;

  /* Transitions - snappy like shadcn */
  --transition: all 0.15s ease;
  --transition-fast: all 0.1s ease;
  --gradient: linear-gradient(to right, #f97316, #ef4444, #f97316);
}

*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--border-color);
}

html, body {
  height: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  margin: 0;
  line-height: inherit;
  color: var(--text-color);
  background-color: var(--light-bg);
}

a {
  color: inherit;
  text-decoration: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* Utility classes */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

/* Page Container */
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Positioning */
.relative { position: relative; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }

/* Display and Layout */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }

/* Spacing */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0.5rem;
}
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.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-8 { padding-top: 2rem; padding-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

/* Sizing */
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-14 { height: 3.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-full { width: 100%; }
.max-w-2xl { max-width: 42rem; }
.min-h-screen { min-height: 100vh; }
.min-h-\[calc\(100vh-3\.5rem\)\] { min-height: calc(100vh - 3.5rem); }

/* Backgrounds */
.bg-white { background-color: rgb(255 255 255); }
.bg-gray-50 { background-color: rgb(249 250 251); }
.bg-gray-100 { background-color: rgb(243 244 246); }
.bg-neutral-900 { background-color: rgb(23 23 23); }

/* Typography */
.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.text-white { color: rgb(255, 255, 255); }
.text-neutral-500 { color: rgb(115, 115, 115); }
.text-neutral-600 { color: rgb(82, 82, 82); }
.text-neutral-900 { color: rgb(23, 23, 23); }
.text-\[\#FF4500\] { color: rgb(255, 69, 0); }

/* Effects */
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }

/* Border Radius */
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Additional Sizing */
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

/* Additional Typography */
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

/* Additional Colors */
.text-black { color: rgb(0, 0, 0); }
.text-gray-600 { color: rgb(75, 85, 99); }
.bg-\[\#FF4500\] { background-color: #FF4500; }
.border-\[\#FF4500\] { border-color: #FF4500; }
.border-2 { border-width: 2px; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Step Cards - How It Works section */
.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: var(--transition-fast);
}

.step-card:hover {
  border-color: #d4d4d4;
  box-shadow: var(--shadow-md);
}

.step-number {
  width: 3rem;
  height: 3rem;
  background: var(--foreground);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--background);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.step-description {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  letter-spacing: -0.01em;
}

/* Testimonials - shadcn-inspired */
.testimonial-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--rounded-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--background);
  letter-spacing: -0.01em;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
  .testimonial-column {
    margin-top: 0 !important;
  }
}

.testimonial-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: var(--transition-fast);
}

.testimonial-card:hover {
  border-color: #d4d4d4;
  box-shadow: var(--shadow-md);
}

.testimonial-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--foreground);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, #FF4500 0%, #ff6b3d 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.02em;
}

.testimonial-avatar.variant-1 { background: linear-gradient(135deg, #FF4500 0%, #ff6b3d 100%); }
.testimonial-avatar.variant-2 { background: linear-gradient(135deg, #0a0a0a 0%, #262626 100%); }
.testimonial-avatar.variant-3 { background: linear-gradient(135deg, #737373 0%, #a3a3a3 100%); }

.testimonial-name {
  font-weight: 500;
  color: var(--foreground);
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}

.testimonial-role {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

/* FAQ Accordion - shadcn-inspired */
.faq-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item:first-child {
  border-top: none;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
  transition: var(--transition-fast);
  letter-spacing: -0.01em;
}

.faq-question:hover {
  background: var(--muted);
}

.faq-question:focus {
  outline: none;
}

.faq-question:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}

.faq-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--muted-foreground);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

/* Navbar */
.navbar {
  background-color: var(--light-color);
  box-shadow: var(--shadow-sm);
}

.navbar a, .navbar button {
  border: none !important;
  outline: none !important;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

.brand-suffix {
  font-size: 1.25rem;
  color: var(--medium-gray);
}

.icon {
  vertical-align: middle;
}

/* Hero Section - shadcn-inspired */
.hero {
  background-color: var(--background);
}

.hero-headline {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subheadline {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 0;
  background-color: var(--gray-color);
  flex: 1;
}

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

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--dark-color);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--medium-gray);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.125rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.cta-button:hover {
  background-color: #E03D00;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.cta-button .icon {
  transition: transform 0.3s ease;
}

.cta-button:hover .icon {
  transform: translateX(4px);
}

/* Action Button - shadcn-inspired */
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--foreground);
  color: var(--background);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--rounded-full);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: var(--transition-fast);
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.action-button:hover {
  background-color: #262626;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px 0 rgb(0 0 0 / 0.1);
}

.action-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.action-button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.action-button .icon {
  transition: transform 0.15s ease;
}

.action-button:hover .icon {
  transform: translateX(2px);
}

/* Gradient Text Effect */
.gradient-text {
  background: var(--gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient 4s linear infinite;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Line clamp */
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Hover States */
.hover\:bg-neutral-800:hover {
  background-color: rgb(38 38 38);
}

.hover\:bg-gray-100:hover {
  background-color: rgb(243 244 246);
}

.nav-button.primary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--rounded-full);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  outline: none;
}

.nav-button.primary:hover {
  background-color: #FF5722;
}

/* Features Section */
.features-section {
  background-color: var(--light-color);
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--dark-color);
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 1rem auto 0;
}

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

.feature-card {
  text-align: center;
  padding: 2rem;
  border-radius: var(--border-radius);
  background-color: var(--off-white);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background-color: rgba(255, 69, 0, 0.1);
  border-radius: 50%;
  color: var(--primary-color);
}

.feature-card h3 {
  font-size: 1.5rem;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

.feature h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

/* Posts grid (preserved for profile page) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.post-card {
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.post-content {
  padding: 1.5rem;
}

.post-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--medium-gray);
  display: flex;
  justify-content: space-between;
}

/* Loader */
.loader {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-message {
  text-align: center;
  margin-top: 1rem;
  color: var(--medium-gray);
}

/* Footer */
.site-footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 1.5rem 0;
  text-align: center;
  margin-top: auto;
}

/* Media queries */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    padding: 4rem 0;
  }
  
  .features-section {
    padding: 3rem 0;
  }
  
  /* Add more horizontal padding on mobile for landing page only */
  .hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* Adjust text sizes for better mobile readability on landing page */
  .hero-headline {
    font-size: 2.25rem;
    line-height: 1.15;
  }

  .hero-subheadline {
    font-size: 1rem;
  }

  .hero .text-6xl {
    font-size: 2.5rem;
    line-height: 1.1;
  }

  .hero .text-xl {
    font-size: 1.125rem;
  }
  
  /* Improve FAQ spacing on mobile */
  .faq-question {
    font-size: 1rem;
    padding: 1.25rem 0;
  }
  
  .faq-answer p {
    font-size: 0.9375rem;
  }
  
  /* Adjust section padding on mobile */
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  /* Improve testimonial cards on mobile */
  .testimonial-card {
    padding: 1.25rem;
  }
  
  .testimonial-text {
    font-size: 0.9375rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
