/* ===== CSS Variables ===== */
:root {
  /* Colors - Cyber/Tech Palette */
  --color-bg: #050508;
  --color-bg-secondary: #0a0a0f;
  --color-bg-card: rgba(20, 20, 30, 0.6);
  --color-bg-card-hover: rgba(30, 30, 45, 0.8);
  --color-text: #ffffff;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;

  --color-primary: #ff6b4a;
  --color-primary-hover: #ff8266;
  --color-primary-glow: rgba(255, 107, 74, 0.4);

  --color-accent: #7c3aed;
  --color-cyan: #06b6d4;

  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-glow: rgba(255, 255, 255, 0.2);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #ff6b4a 0%, #ff8f70 50%, #ffa366 100%);
  --gradient-hero-text: linear-gradient(to right, #ffffff 20%, #ff6b4a 50%, #f59e0b 80%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(255, 107, 74, 0.15) 0%, transparent 70%);


  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3.5rem;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--color-primary-glow);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Tech Background Grid */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at 50% 0%, black 40%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-sm {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-base);
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px var(--color-primary-glow);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  color: var(--color-text);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--spacing-md) 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 700;
  font-size: var(--font-size-xl);
}

.logo:hover {
  color: var(--color-text);
}

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

.nav-links {
  display: flex;
  gap: var(--spacing-xl);
}

.nav-links a {
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: var(--font-size-sm);
}

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

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--spacing-4xl) 0;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 800px;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.15) 0%, rgba(255, 107, 74, 0.1) 40%, transparent 70%);
  filter: blur(80px);
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--spacing-lg);
  letter-spacing: -0.03em;
}

.gradient-text {
  background: var(--gradient-hero-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 5s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  /* Vertical alignment */
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-2xl);
  flex-wrap: wrap;
  /* Allow wrapping on small screens */
}

/* Ensure buttons have consistent height */
.hero-actions .btn {
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  /* Ensure stats are aligned with the left edge */
}

.stat {
  text-align: left;
  /* Align text to the left */
  display: flex;
  flex-direction: column;
}

.stat-value {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
  opacity: 0.5;
  /* More subtle divider */
}

/* ===== App Window Preview (3D & Glass) ===== */
.hero-visual {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.app-window {
  width: 100%;
  max-width: 440px;
  background: rgba(20, 20, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform 0.1s ease-out;
}

.app-titlebar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.titlebar-buttons {
  display: flex;
  gap: 8px;
}

.titlebar-buttons span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.btn-close {
  background: #ff5f57;
}

.btn-minimize {
  background: #febc2e;
}

.btn-maximize {
  background: #28c840;
}

.titlebar-title {
  flex: 1;
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.app-content {
  padding: var(--spacing-lg);
  min-height: 280px;
}

.chat-message {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.chat-message.user {
  justify-content: flex-end;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.message-bubble {
  max-width: 75%;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}

.chat-message.assistant .message-bubble {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
}

.chat-message.user .message-bubble {
  background: var(--gradient-primary);
  color: white;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  margin-top: var(--spacing-sm);
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--color-text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ===== Features Section ===== */
/* ===== Features Spotlight Effect ===== */
.features {
  padding: var(--spacing-4xl) 0;
  background: transparent;
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.feature-card {
  position: relative;
  padding: var(--spacing-xl);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base);
  overflow: hidden;
  /* Spotlight Logic */
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y),
      rgba(255, 255, 255, 0.3),
      transparent 40%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

.feature-card:hover::before {
  opacity: 1;
}

/* Feature Glow Background */
.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
      rgba(255, 255, 255, 0.04),
      transparent 40%);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s;
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.03);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
  transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 0 20px var(--color-primary-glow);
  border-color: transparent;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: white;
}

.feature-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.feature-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ===== Download Section ===== */
.download {
  padding: var(--spacing-4xl) 0;
}

/* ===== Downloads Grid ===== */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  max-width: 900px;
  margin: 0 auto;
}

.download-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.download-card.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 30px rgba(255, 107, 74, 0.1);
}

.download-card.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.download-card.coming-soon {
  opacity: 1;
  /* Make it fully visible but visually distinct */
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-style: solid;
  /* Remove dashed style */
}

.download-card.coming-soon .os-icon {
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text-muted);
}

.download-card.coming-soon h3,
.download-card.coming-soon p {
  color: var(--color-text-muted);
}

.download-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.os-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
}

.os-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--color-text);
}

.os-icon.macos svg {
  fill: white;
}

.os-info h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: 2px;
}

.version-badge {
  font-size: var(--font-size-xs);
  color: var(--color-primary);
  background: rgba(255, 107, 74, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.status-badge {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.download-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.download-body p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
  min-height: 40px;
}

.btn-block {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  /* Push to bottom */
  height: 48px;
  /* Enforce consistent height */
}

.upcoming-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
  cursor: default;
  border: 1px solid var(--color-border);
}

.upcoming-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: none;
  box-shadow: none;
}

.macos-icon svg {
  width: 64px;
  height: 64px;
  fill: var(--color-text-secondary);
}

/* ===== Footer ===== */
.footer {
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-2xl);
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-sm);
}

.footer-links {
  display: flex;
  gap: var(--spacing-3xl);
}

.footer-column h4 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.footer-column a {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

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

.footer-bottom {
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-bottom p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-title {
    font-size: var(--font-size-4xl);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .stat-divider {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .download-visual {
    order: -1;
  }

  .download-buttons {
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--spacing-xl);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--spacing-xl);
  }
}