/* SparkAI - Main Page Styles */

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #09090b;
  color: #fafafa;
  line-height: 1.6;
}
.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
  padding: 20px 0;
  border-bottom: 1px solid #27272a;
}
nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #fafafa;
  text-decoration: none;
}
.logo img { height: 32px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: #a1a1aa; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: #fafafa; }

/* Hero */
.hero {
  padding: 70px 0 50px;
  text-align: center;
}
.hero-logo {
  max-width: 200px;
  margin: 0 auto 28px;
}
.hero-logo img { width: 100%; height: auto; }
h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
}
h1 span {
  background: linear-gradient(135deg, #74749b, #9494b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.subtitle {
  color: #a1a1aa;
  font-size: 17px;
  max-width: 480px;
  margin: 0 auto 28px;
  min-height: 26px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 auto 26px;
  max-width: 680px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c9c9d1;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1px;
}
.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #74749b;
  box-shadow: 0 0 0 3px rgba(116, 116, 155, 0.18);
  flex-shrink: 0;
}
.typewriter {
  border-right: 2px solid #74749b;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink {
  50% { border-color: transparent; }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #74749b, #9494b8);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 20px rgba(116, 116, 155, 0.35), 0 0 0 0 rgba(116, 116, 155, 0);
  animation: btn-float 3s ease-in-out infinite;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: btn-shimmer 3s ease-in-out infinite;
}
.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(116, 116, 155, 0.45), 0 0 0 4px rgba(116, 116, 155, 0.15);
  background: linear-gradient(135deg, #8585ad, #a5a5c5);
}
.btn:active {
  transform: translateY(-2px) scale(0.98);
  transition-duration: 0.1s;
}
.btn svg {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn:hover svg {
  transform: translateX(5px);
}
@keyframes btn-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes btn-shimmer {
  0%, 100% { left: -100%; opacity: 0; }
  50% { left: 100%; opacity: 1; }
}

/* Features */
.features { padding: 50px 0; }
.features h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 10px;
  padding: 16px 18px;
  transition: border-color 0.2s, transform 0.2s ease, background 0.2s ease;
}
.feature:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  background: rgba(24, 24, 27, 0.85);
}
.feature.feature-code {
  padding: 0;
  background: transparent;
  border: none;
  display: block;
  min-width: 0;
  overflow: hidden;
}
.feature.feature-code:hover {
  transform: none;
  background: transparent;
  border-color: transparent;
}
.feature-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: color-mix(in srgb, var(--accent, #74749b) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #74749b) 26%, transparent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent, #9e9eb8);
  filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--accent, #74749b) 26%, transparent));
}
.feature-content { flex: 1; }
.feature h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.feature p { color: #a1a1aa; font-size: 13px; line-height: 1.5; }

/* Code Card - Matches feature card styling */
.code-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.2s, transform 0.2s ease, background 0.2s ease;
  overflow: hidden;
  min-width: 0;
}
.code-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  background: rgba(24, 24, 27, 0.85);
}
.code-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.code-card-content {
  flex: 1;
  min-width: 0;
}
.code-card-content h3 {
  font-size: 14px;
  font-weight: 600;
}
.code-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.code-card-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #52525b;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.code-card-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
}
.code-card-copy.copied {
  color: #22c55e;
}
/* CSS-only copy icon */
.icon-copy {
  width: 13px;
  height: 13px;
  position: relative;
}
.icon-copy::before,
.icon-copy::after {
  content: "";
  position: absolute;
  border: 1.5px solid currentColor;
  border-radius: 1.5px;
}
.icon-copy::before {
  width: 8px;
  height: 8px;
  top: 0;
  left: 0;
}
.icon-copy::after {
  width: 8px;
  height: 8px;
  bottom: 0;
  right: 0;
  background: #18181b;
}
.icon-check {
  width: 13px;
  height: 13px;
  position: relative;
}
.icon-check::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 5px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  top: 3px;
  left: 2px;
}
.code-card-tab {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #52525b;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.code-card-tab:hover {
  color: #a1a1aa;
}
.code-card-tab.active {
  color: #e4e4e7;
  background: rgba(255,255,255,0.08);
}
.code-card-body {
  background: #0c0c0e;
  border: 1px solid #1f1f23;
  border-radius: 6px;
  padding: 12px 14px;
}
.code-card-body pre {
  margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  color: #e4e4e7;
  white-space: pre-wrap;
  word-break: break-all;
  font-feature-settings: 'liga' 1, 'calt' 1;
  letter-spacing: -0.01em;
}
.code-comment { color: #6b7280; }
.code-string { color: #a5f3fc; }
.code-attr { color: #c4b5fd; }
.code-keyword { color: #f472b6; }

/* Footer */
footer {
  padding: 28px 0;
  border-top: 1px solid #27272a;
  text-align: center;
}
footer a { color: #71717a; text-decoration: none; margin: 0 16px; font-size: 14px; }
footer a:hover { color: #a1a1aa; }

@media (max-width: 700px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-code { grid-column: 1; }
}
@media (max-width: 500px) {
  .nav-links { gap: 16px; }
  .hero { padding: 50px 0 40px; }
}
