/* down.edit Landing Page Styles */

:root {
  /* Brand Colors - Dark Slate Theme */
  --bg-primary: #334155;        /* Dark Slate - main background */
  --bg-secondary: #1E293B;      /* Deep Gray */
  --bg-card: #475569;           /* Steel Blue - card backgrounds */
  --bg-card-hover: #64748B;     /* Slate Blue - card hover */
  --text-primary: #F8FAFC;      /* Off White - primary text */
  --text-secondary: #E2E8F0;    /* Light Gray - secondary text */
  --text-muted: #94A3B8;        /* Light Slate - muted text */
  --accent: #35CBCC;            /* Teal - highlight/buttons */
  --accent-light: #5DD9DA;      /* Lighter teal */
  --accent-glow: rgba(53, 203, 204, 0.4);  /* Teal glow */
  --border: #64748B;            /* Slate Blue - borders */
  --gradient-start: #35CBCC;    /* Teal */
  --gradient-end: #1B1B35;      /* Dark Navy */
  --success: #35CBCC;           /* Teal */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated Background */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(53, 203, 204, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(27, 27, 53, 0.15), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.5rem 2rem;
  background: rgba(51, 65, 85, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--bg-secondary);
  border-radius: 8px;
  font-weight: 700;
}

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

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

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-github {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.nav-github:hover {
  background: var(--bg-card);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  z-index: 1;
}

.hero-content {
  text-align: center;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--bg-secondary);
  box-shadow: 0 4px 20px var(--accent-glow);
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

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

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

.btn-icon {
  font-size: 1.2rem;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 4rem;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* Hero App Window */
.hero-image {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.app-window {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.window-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.window-dots span:nth-child(1) { background: #ff5f57; }
.window-dots span:nth-child(2) { background: #ffbd2e; }
.window-dots span:nth-child(3) { background: #28c840; }

.window-title {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.window-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 300px;
}

.editor-pane {
  padding: 1.5rem;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 0.9rem;
  border-right: 1px solid var(--border);
  background: var(--bg-primary);
}

.code-line {
  padding: 0.25rem 0;
  color: var(--text-secondary);
}

.md-hash { color: var(--accent); font-weight: 600; }
.md-bold { color: var(--text-primary); font-weight: 600; }
.md-italic { color: var(--text-primary); font-style: italic; }
.md-list { color: var(--accent); }

.preview-pane {
  padding: 1.5rem;
  background: var(--bg-secondary);
}

.preview-h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.preview-h2 {
  font-size: 1.2rem;
  margin: 1rem 0 0.5rem;
}

.preview-pane p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.preview-pane ul {
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.preview-pane li {
  margin: 0.25rem 0;
}

.glow {
  position: absolute;
  bottom: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 300px;
  background: radial-gradient(ellipse, var(--accent-glow), transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

/* Features Section */
.features {
  position: relative;
  padding: 6rem 2rem;
  z-index: 1;
}

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

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--bg-secondary);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

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

/* Comparison Section */
.comparison {
  position: relative;
  padding: 6rem 2rem;
  z-index: 1;
}

.comparison-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  opacity: 0;
  transform: translateY(20px);
}

.comparison-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.comparison-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.comparison-text p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.comparison-stats {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.comp-stat {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 1rem;
}

.comp-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.comp-bar {
  height: 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  overflow: hidden;
}

.comp-fill {
  height: 100%;
  border-radius: 6px;
  width: 0;
  transition: width 1s ease-out;
}

.comp-fill.small {
  background: var(--accent);
}

.comp-fill.large {
  background: var(--text-muted);
}

.comparison-content.visible .comp-fill {
  width: var(--width);
}

.comp-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 70px;
  text-align: right;
}

/* Download Section */
.download {
  position: relative;
  padding: 6rem 2rem;
  z-index: 1;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto 2rem;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.download-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.download-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.download-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.download-icon svg {
  width: 24px;
  height: 24px;
  color: var(--text-primary);
}

.download-info {
  flex: 1;
}

.download-platform {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
}

.download-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.download-arrow {
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s ease;
}

.download-card:hover .download-arrow {
  opacity: 1;
  transform: translateY(0);
}

.download-pwa {
  background: var(--accent);
  border-color: transparent;
}

.download-pwa .download-icon {
  background: rgba(30, 41, 59, 0.3);
}

.download-pwa .download-icon svg,
.download-pwa .download-platform,
.download-pwa .download-arrow {
  color: var(--bg-secondary);
}

.download-pwa .download-meta {
  color: rgba(30, 41, 59, 0.8);
}

.download-pwa .download-arrow {
  opacity: 1;
}

.download-pwa:hover {
  background: var(--accent-light);
  transform: translateY(-4px);
}

/* Highlighted PWA card for mobile users */
.download-pwa.highlighted {
  animation: pulse-glow 2s ease-in-out infinite;
  order: -1; /* Move to front on mobile */
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(53, 203, 204, 0.3);
  }
  50% {
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(53, 203, 204, 0.5);
  }
}

.download-note {
  text-align: center;
  color: var(--text-muted);
}

.download-note a {
  color: var(--accent-light);
  text-decoration: none;
}

.download-note a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  position: relative;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  z-index: 1;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

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

/* Animations */
.animate-fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fadeIn {
  to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 6rem 1.5rem 3rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .stat-divider {
    width: 60px;
    height: 1px;
  }
  
  .window-content {
    grid-template-columns: 1fr;
  }
  
  .editor-pane {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .nav-links a:not(.nav-github) {
    display: none;
  }
  
  .comp-stat {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .comp-value {
    text-align: left;
  }
}
