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

:root {
  /* Colors from DeepMargin app - OKLCH values */
  --background: #0a0a0a;
  --foreground: #fafafa;
  --card: #1a1a1a;
  --primary: #10b981; /* emerald-500 */
  --primary-rgb: 16, 185, 129;
  --muted-foreground: #8f8f8f;
  --border: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-sans: 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --container-padding: 2rem;
  --section-spacing: 6rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
  position: relative;
  z-index: 1;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  margin-bottom: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo-img {
  height: 50px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.nav-link:hover {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link-login {
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  background: rgba(var(--primary-rgb), 0.1);
}

.nav-link-login:hover {
  background: rgba(var(--primary-rgb), 0.2);
  border-color: rgba(var(--primary-rgb), 0.5);
  color: var(--primary);
}

/* Hero Section */
.hero {
  text-align: center;
  max-width: 900px;
  margin: 4.5rem auto 8rem;
  padding: 0 1rem;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease;
}

.hero-image {
  margin: 3rem auto;
  max-width: 1000px;
  animation: fadeInUp 0.6s ease 0.15s both;
}

.carousel {
  position: relative;
  width: 100%;
}

.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.screenshot {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: opacity 0.8s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.screenshot:first-child {
  position: relative;
}

.screenshot.active {
  opacity: 1;
  pointer-events: auto;
}

.screenshot:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.dot:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.2);
}

.dot.active {
  background: var(--primary);
  border-color: var(--primary);
  width: 12px;
  height: 12px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease 0.25s both;
  letter-spacing: -0.01em;
}

.hero-description {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-description strong {
  color: var(--foreground);
  font-weight: 600;
}

/* CTA Buttons */
.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--background);
  box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
}

.btn-primary:hover {
  background: #14ca95;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
}

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

/* Features Grid */
.features {
  display: flex;
  gap: 1.5rem;
  margin: var(--section-spacing) 0;
  animation: fadeIn 0.8s ease 0.4s both;
  overflow: hidden;
  position: relative;
}

@media (max-width: 768px) {
  .features {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
}

.features-track {
  display: flex;
  gap: 1.5rem;
  animation: scroll-left 40s linear infinite;
}

.features-track:hover {
  animation-play-state: paused;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.feature-card {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.feature-card:hover {
  background: rgba(var(--primary-rgb), 0.05);
  border-color: rgba(var(--primary-rgb), 0.2);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.feature-description {
  color: var(--muted-foreground);
  line-height: 1.6;
  font-size: 0.9375rem;
}

/* Stats Section */
.stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 2rem;
  padding: 3rem 2rem;
  margin: var(--section-spacing) 0;
  animation: fadeIn 0.8s ease 0.6s both;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-value {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--foreground) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 60px;
  background: var(--border);
}

/* Footer */
.footer {
  margin-top: calc(var(--section-spacing) * 1.5);
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.footer-logo-img {
  height: 50px;
  width: auto;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  opacity: 0.8;
}

.footer-text {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.footer-divider {
  color: var(--border);
}

.footer-legal {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Background Decoration */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-decoration::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

.bg-decoration::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.05) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 25s ease-in-out infinite reverse;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-50px, 30px) scale(1.1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --container-padding: 1.5rem;
    --section-spacing: 4rem;
  }

  .nav {
    margin-bottom: 2rem;
  }

  .hero {
    margin: 4rem auto;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-description {
    font-size: 1.125rem;
  }

  .cta-group {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .feature-card {
    min-width: 260px;
    max-width: 280px;
    scroll-snap-align: center;
  }

  .stats {
    flex-direction: column;
    gap: 2rem;
  }

  .stat-divider {
    width: 60px;
    height: 1px;
  }

  .stat-value {
    font-size: 2.5rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .footer-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

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

  .badge {
    font-size: 0.8125rem;
    padding: 0.4rem 0.875rem;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}

.modal-content {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  animation: fadeInUp 0.3s ease;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--foreground);
}

.modal-header {
  margin-bottom: 2rem;
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.modal-subtitle {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Form Styles */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--foreground);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.form-message {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: fadeInUp 0.3s ease;
}

.form-message.success {
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  color: var(--primary);
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-full {
  width: 100%;
  justify-content: center;
  position: relative;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loader {
  width: 16px;
  height: 16px;
  border: 2px solid var(--background);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
  .modal-content {
    padding: 1.5rem;
    max-height: 95vh;
  }

  .modal-title {
    font-size: 1.5rem;
  }
}
