/* ============================================
   CSS Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #ec4899;
  --accent: #10b981;
  --dark: #1e293b;
  --dark-light: #334155;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --white: #ffffff;
  --bg-light: #f8fafc;
  --bg-dark: #0f172a;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-download: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f59e0b 100%);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Poppins', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--dark);
  transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  z-index: -1;
  width: 100%;
  height: 100%;
}

.hero-content {
  text-align: center;
  color: var(--white);
  max-width: 900px;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
}

.title-line.highlight {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-white-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-white-outline:hover {
  background: var(--white);
  color: var(--primary);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--white);
  border-radius: 15px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--white);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Mission Section
   ============================================ */
.mission {
  padding: var(--spacing-xl) 0;
  background: var(--bg-light);
}

.mission-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.mission-text {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--dark-light);
  margin-bottom: 1.5rem;
}

.mission-text.emphasis {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--dark);
  margin-top: 2rem;
}

/* ============================================
   Features Section
   ============================================ */
.features {
  padding: var(--spacing-xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

.section-title.white,
.section-subtitle.white {
  color: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.feature-icon svg {
  width: 30px;
  height: 30px;
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark);
}

.feature-description {
  color: var(--gray);
  line-height: 1.7;
}

/* ============================================
   Smart Home Section
   ============================================ */
.smart-home {
  padding: var(--spacing-xl) 0;
  background: var(--gradient-dark);
  color: var(--white);
}

.smart-home-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.device-list {
  margin-top: 3rem;
}

.device-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.device-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(10px);
}

.device-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.device-info h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.device-info p {
  opacity: 0.9;
  line-height: 1.7;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.device-card {
  position: relative;
  padding: 2rem;
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.device-card:hover {
  transform: translateY(-5px);
}

.device-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hue-card {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.3) 0%, rgba(236, 72, 153, 0.3) 100%);
}

.sonos-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(147, 51, 234, 0.3) 100%);
}

.wemo-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
  grid-column: 1 / -1;
}

.device-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.device-icon-large {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.device-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.device-status {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ============================================
   Automation Section
   ============================================ */
.automation {
  padding: var(--spacing-xl) 0;
  background: var(--bg-light);
}

.automation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.automation-item {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.automation-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: var(--transition);
}

.automation-item:hover::before {
  transform: scaleY(1);
}

.automation-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.automation-number {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.2;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.automation-item h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark);
  position: relative;
}

.automation-item p {
  color: var(--gray);
  line-height: 1.7;
  position: relative;
}

/* ============================================
   Download Section
   ============================================ */
.download {
  padding: var(--spacing-xl) 0;
  background: var(--gradient-download);
  color: var(--white);
}

.download-content {
  text-align: center;
}

.download-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.download-card-single {
  max-width: 400px;
  width: 100%;
}

.download-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 3rem 2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.download-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

.download-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.download-card h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.download-card p {
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.7;
}

.version-info {
  margin-top: 3rem;
  opacity: 0.8;
}

.copyright {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section p {
  opacity: 0.8;
  line-height: 1.7;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.footer-section ul li a {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  opacity: 1;
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.6;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 968px) {
  .smart-home-content {
    grid-template-columns: 1fr;
  }
  
  .device-grid {
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background: var(--white);
    width: 100%;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .hero {
    padding: 6rem 0 3rem;
  }
  
  .hero-stats {
    gap: 2rem;
  }
  
  .features-grid,
  .automation-grid {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 1.5rem;
  }
  
  .device-grid {
    grid-template-columns: 1fr;
  }
  
  .wemo-card {
    grid-column: 1;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
  
  .download-cards {
    grid-template-columns: 1fr;
  }
}