/* ===== CSS Variables ===== */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #06b6d4;
  --accent-color: #f59e0b;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  --bg-dark: #111827;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Global Styles (Mobile First) ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

/* ===== Navigation (Mobile First) ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
}

.logo-icon {
  color: var(--primary-color);
  font-size: 1.5rem;
}

/* Mobile: Hide nav links by default */
.nav-links {
  display: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

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

.nav-cta {
  background: var(--primary-color);
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.nav-cta::after {
  display: none;
}

/* Mobile: Show menu toggle */
.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0.5rem;
}

/* Tablet and up: Show nav links, hide toggle */
@media (min-width: 768px) {
  .navbar .container {
    padding: 1rem 1.5rem;
  }

  .logo {
    font-size: 1.5rem;
    gap: 0.5rem;
  }

  .logo-icon {
    font-size: 2rem;
  }

  .nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
  }

  .nav-cta {
    padding: 0.5rem 1.25rem;
  }

  .mobile-menu-toggle {
    display: none;
  }
}

@media (min-width: 1024px) {
  .nav-links {
    gap: 2rem;
  }
}

/* ===== Hero Section (Mobile First) ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 0 3rem;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.3), transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(168, 85, 247, 0.2), transparent 50%);
  animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  animation: fadeInUp 1s ease;
  padding: 0 0.5rem;
}

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

/* Mobile: Smaller text */
.hero-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(to right, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0.95;
  max-width: 100%;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 3rem;
  width: 100%;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.stat-label {
  font-size: 0.75rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

/* Tablet: Medium text */
@media (min-width: 640px) {
  .hero {
    padding: 7rem 0 3.5rem;
  }

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

  .hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2.25rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    width: auto;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.875rem;
  }
}

/* Desktop: Large text */
@media (min-width: 1024px) {
  .hero {
    padding: 8rem 0 4rem;
  }

  .hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 700px;
  }

  .hero-buttons {
    margin-bottom: 4rem;
  }

  .hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

/* ===== Buttons (Mobile First) ===== */
.btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: white;
  color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Tablet and up: Auto width buttons */
@media (min-width: 640px) {
  .btn {
    width: auto;
    padding: 0.875rem 2rem;
  }

  .btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
  }
}

/* ===== Features Section (Mobile First) ===== */
.features {
  padding: 3rem 0;
  background: var(--bg-light);
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.section-subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  padding: 0 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.6;
  font-size: 0.9375rem;
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
  .features {
    padding: 4rem 0;
  }

  .section-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
  }

  .section-subtitle {
    font-size: 1.125rem;
    margin-bottom: 3rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    margin-top: 2.5rem;
  }

  .feature-card {
    padding: 2.25rem;
  }

  .feature-card h3 {
    font-size: 1.375rem;
    margin-bottom: 0.875rem;
  }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  .features {
    padding: 6rem 0;
  }

  .section-title {
    font-size: 2.75rem;
  }

  .section-subtitle {
    font-size: 1.25rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
  }

  .feature-card {
    padding: 2.5rem;
  }

  .feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
  }

  .feature-icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
  }

  .feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .feature-card p {
    line-height: 1.7;
    font-size: 1rem;
  }
}

/* ===== Benefits Section (Mobile First) ===== */
.benefits {
  padding: 3rem 0;
  background: white;
}

.benefits-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.benefits-text h2 {
  font-size: 1.875rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.benefits-list li {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.check-icon {
  background: var(--primary-color);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.875rem;
}

.benefits-list strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.benefits-list p {
  color: var(--text-light);
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.benefits-visual {
  position: relative;
  order: -1;
}

.code-preview {
  background: var(--bg-dark);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.code-header {
  background: #1e293b;
  padding: 0.625rem 0.875rem;
  display: flex;
  gap: 0.375rem;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}

.code-dot:nth-child(1) { background: #ef4444; }
.code-dot:nth-child(2) { background: #f59e0b; }
.code-dot:nth-child(3) { background: #22c55e; }

.code-content {
  padding: 1.25rem;
  overflow-x: auto;
}

.code-content pre {
  margin: 0;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
}

.code-comment { color: #94a3b8; }
.code-keyword { color: #f472b6; }
.code-string { color: #34d399; }

/* Tablet: Side by side layout */
@media (min-width: 768px) {
  .benefits {
    padding: 4rem 0;
  }

  .benefits-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }

  .benefits-text h2 {
    font-size: 2.125rem;
    margin-bottom: 1.75rem;
  }

  .benefits-visual {
    order: 0;
  }

  .benefits-list {
    gap: 1.375rem;
  }

  .check-icon {
    width: 26px;
    height: 26px;
  }

  .benefits-list strong {
    font-size: 1.0625rem;
  }

  .code-content {
    padding: 1.375rem;
  }

  .code-content pre {
    font-size: 0.9rem;
  }
}

/* Desktop: Larger spacing and animation */
@media (min-width: 1024px) {
  .benefits {
    padding: 6rem 0;
  }

  .benefits-content {
    gap: 4rem;
  }

  .benefits-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
  }

  .benefits-list {
    gap: 1.5rem;
  }

  .check-icon {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .benefits-list strong {
    font-size: 1.125rem;
  }

  .benefits-list p {
    font-size: 1rem;
  }

  .code-preview {
    animation: float 6s ease-in-out infinite;
    box-shadow: var(--shadow-xl);
  }

  .code-header {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .code-dot {
    width: 12px;
    height: 12px;
  }

  .code-content {
    padding: 1.5rem;
  }

  .code-content pre {
    font-size: 0.95rem;
    line-height: 1.8;
  }
}

/* ===== Stats Section (Mobile First) ===== */
.stats-section {
  padding: 3rem 0;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.stat-card {
  text-align: center;
  padding: 1.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.375rem;
  display: block;
}

.stat-description {
  font-size: 0.875rem;
  opacity: 0.9;
  line-height: 1.4;
}

/* Tablet: 4 columns */
@media (min-width: 640px) {
  .stats-section {
    padding: 4rem 0;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
  }

  .stat-card {
    padding: 1.5rem;
  }

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

  .stat-description {
    font-size: 0.9375rem;
  }
}

/* Desktop: Larger text */
@media (min-width: 1024px) {
  .stats-section {
    padding: 6rem 0;
  }

  .stats-grid {
    gap: 3rem;
  }

  .stat-card {
    padding: 2rem;
  }

  .stat-value {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
  }

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

/* ===== CTA Section (Mobile First) ===== */
.cta-section {
  padding: 3rem 0;
  background: var(--bg-light);
  text-align: center;
}

.cta-section h2 {
  font-size: 1.875rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  padding: 0 1rem;
}

.cta-section p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 1rem;
}

/* Tablet: Horizontal buttons */
@media (min-width: 640px) {
  .cta-section {
    padding: 4rem 0;
  }

  .cta-section h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
  }

  .cta-section p {
    font-size: 1.125rem;
    margin-bottom: 2.25rem;
  }

  .cta-buttons {
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    padding: 0;
  }
}

/* Desktop: Larger text */
@media (min-width: 1024px) {
  .cta-section {
    padding: 6rem 0;
  }

  .cta-section h2 {
    font-size: 2.75rem;
  }

  .cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
  }
}

/* ===== Footer (Mobile First) ===== */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  max-width: 100%;
}

.footer-brand p {
  color: var(--text-lighter);
  margin-top: 0.875rem;
  font-size: 0.9375rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: white;
  font-weight: 600;
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-column a {
  color: var(--text-lighter);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.875rem;
}

.footer-column a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-lighter);
  margin: 0;
  font-size: 0.875rem;
}

.footer-social {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
}

.footer-social a {
  color: var(--text-lighter);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9375rem;
}

.footer-social a:hover {
  color: var(--primary-light);
  transform: translateY(-2px);
}

/* Tablet: 2 column layout for footer links */
@media (min-width: 640px) {
  .footer {
    padding: 3.5rem 0 1.75rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .footer-links {
    gap: 2.5rem;
  }

  .footer-column h4 {
    font-size: 1.0625rem;
    margin-bottom: 1.125rem;
  }

  .footer-column a {
    font-size: 0.9375rem;
  }

  .footer-column ul {
    gap: 0.7rem;
  }

  .footer-bottom {
    padding-top: 1.75rem;
  }

  .footer-bottom p {
    font-size: 0.9375rem;
  }
}

/* Desktop: Full footer layout */
@media (min-width: 968px) {
  .footer {
    padding: 4rem 0 2rem;
  }

  .footer-content {
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
    align-items: start;
  }

  .footer-brand {
    max-width: 300px;
  }

  .footer-brand p {
    margin-top: 1rem;
    font-size: 1rem;
  }

  .footer-links {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .footer-column h4 {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
  }

  .footer-column a {
    font-size: 1rem;
  }

  .footer-column ul {
    gap: 0.75rem;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    text-align: left;
  }

  .footer-bottom p {
    font-size: 1rem;
  }

  .footer-social {
    gap: 1.5rem;
  }

  .footer-social a {
    font-size: 1rem;
  }
}
