/* ============================================
   CSS VARIABLES & THEME
   ============================================ */

:root {
  --vp-font-family-base: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  --vp-font-family-mono: ui-monospace, 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
  
  /* Brand colors */
  --vp-c-brand-1: #228cf4;
  --vp-c-brand-2: #1a7ad9;
  --vp-c-brand-3: #1568be;
  --vp-c-brand-soft: rgba(34, 140, 244, 0.14);
  
  /* Light theme colors */
  --vp-c-bg: #ffffff;
  --vp-c-bg-alt: #f6f6f7;
  --vp-c-bg-soft: #f9fafb;
  --vp-c-bg-mute: #e5e7eb;
  --vp-c-border: #e5e7eb;
  --vp-c-text-1: #18181b;
  --vp-c-text-2: #71717a;
  --vp-c-text-3: #a1a1aa;
}

.dark {
  --vp-c-brand-1: #228cf4;
  --vp-c-brand-2: #4da3f7;
  --vp-c-brand-3: #78b9f9;
  --vp-c-brand-soft: rgba(34, 140, 244, 0.16);
  
  /* Dark theme colors */
  --vp-c-bg: #1e1e20;
  --vp-c-bg-alt: #252529;
  --vp-c-bg-soft: #2d2d30;
  --vp-c-bg-mute: #3f3f46;
  --vp-c-border: #3f3f46;
  --vp-c-text-1: #fafafa;
  --vp-c-text-2: #a1a1aa;
  --vp-c-text-3: #71717a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--vp-font-family-base);
  background: var(--vp-c-bg);
  color: var(--vp-c-text-1);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--vp-c-bg);
  border-bottom: 1px solid var(--vp-c-border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--vp-c-text-1);
  font-weight: 600;
  font-size: 1.125rem;
  transition: opacity 0.2s;
}

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

.brand-logo {
  height: 42px;
  width: auto;
}

.brand-text {
  color: var(--vp-c-text-1);
}

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

.nav-link {
  color: var(--vp-c-text-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--vp-c-text-1);
  background: var(--vp-c-bg-soft);
}

.nav-link.active {
  color: var(--vp-c-brand-1);
  font-weight: 600;
  background: var(--vp-c-bg-soft);
}

.nav-link-demo {
  background: var(--vp-c-brand-1) !important;
  color: white !important;
  font-weight: 600;
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
}

.nav-link-demo:hover {
  background: var(--vp-c-brand-2) !important;
  color: white !important;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  color: var(--vp-c-text-2);
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--vp-c-bg-soft);
  color: var(--vp-c-text-1);
}

.theme-icon-dark {
  display: none;
}

.dark .theme-icon-light {
  display: none;
}

.dark .theme-icon-dark {
  display: block;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 2px;
  background: var(--vp-c-text-2);
  border-radius: 2px;
  transition: all 0.2s;
}

@media (max-width: 768px) {
  .navbar-links {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .navbar-container {
    padding: 0 1rem;
  }
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  min-height: calc(100vh - 64px);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  overflow: hidden;
  background: var(--vp-c-bg-soft);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background: linear-gradient(135deg, rgba(34, 140, 244, 0.03) 0%, rgba(77, 163, 247, 0.02) 100%);
}

.dark .hero-gradient {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--vp-c-text-1);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.rotating-word {
  display: inline-block;
  color: #228cf4;
  min-width: 120px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.rotating-word.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--vp-c-text-2);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: #228cf4;
  color: white;
}

.btn-primary:hover {
  background: #1a7ad9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 140, 244, 0.4);
}

.btn-secondary {
  background: var(--vp-c-bg-alt);
  color: var(--vp-c-text-1);
  border: 1px solid var(--vp-c-border);
}

.btn-secondary:hover {
  background: var(--vp-c-bg-soft);
  border-color: var(--vp-c-brand-1);
  color: var(--vp-c-brand-1);
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */

.products-section {
  padding: 5rem 0;
  background: var(--vp-c-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--vp-c-text-1);
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.125rem;
  color: var(--vp-c-text-2);
  max-width: 600px;
  margin: 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.product-card {
  background: var(--vp-c-bg-alt);
  border: 1px solid var(--vp-c-border);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--vp-c-brand-1);
}

.product-image {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--vp-c-bg-soft);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--vp-c-text-1);
  margin-bottom: 0.5rem;
}

.product-description {
  font-size: 0.875rem;
  color: var(--vp-c-text-2);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--vp-c-border);
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--vp-c-text-2);
}

.product-price {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--vp-c-text-1);
}

/* Skeleton Loading */
.skeleton {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.product-image-skeleton {
  aspect-ratio: 2 / 1;
  background: var(--vp-c-bg-mute);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.product-content-skeleton {
  padding: 1rem;
}

.skeleton-line {
  height: 1rem;
  background: var(--vp-c-bg-mute);
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.skeleton-line.short {
  width: 60%;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============================================
   BLOG SECTION
   ============================================ */

.blog-section {
  padding: 5rem 0;
  background: var(--vp-c-bg-soft);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card {
  background: var(--vp-c-bg-alt);
  border: 1px solid var(--vp-c-border);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--vp-c-brand-1);
}

.blog-link {
  text-decoration: none;
  display: block;
  height: 100%;
}

.blog-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--vp-c-bg-mute);
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.blog-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--vp-c-brand-1);
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  width: fit-content;
}

.blog-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--vp-c-text-1);
  margin-bottom: 0.75rem;
}

.blog-description {
  font-size: 0.875rem;
  color: var(--vp-c-text-2);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--vp-c-border);
  font-size: 0.875rem;
  color: var(--vp-c-text-2);
}

.blog-read-more {
  color: var(--vp-c-brand-1);
  font-weight: 500;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--vp-c-bg-alt);
  border-top: 1px solid var(--vp-c-border);
  padding: 4rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

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

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

.footer-brand .brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand .logo {
  width: 40px;
  height: 40px;
}

.footer-brand .brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--vp-c-text-1);
}

.brand-description {
  color: var(--vp-c-text-2);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-column {
  min-width: 0;
}

.column-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vp-c-text-1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.625rem;
}

.footer-links a {
  color: var(--vp-c-text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-links a:hover {
  color: var(--vp-c-brand-1);
}

.external-icon {
  font-size: 0.75rem;
  opacity: 0.7;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--vp-c-text-2);
}

.section-footer {
  text-align: center;
  margin-top: 2rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .hero-section {
    min-height: 100vh;
    padding: 3rem 1rem;
  }

  .products-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .products-section,
  .blog-section {
    padding: 3rem 0;
  }
  
  .rotating-word {
    min-width: auto;
    display: inline;
  }
  
  .hero-title {
    white-space: normal;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .footer-brand {
    grid-column: span 2;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-brand {
    grid-column: span 1;
  }
}

