/* ========================================
   ClipSight Landing Page Styles
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-surface: #12121a;
  --bg-terminal: #0d1117;
  --accent-indigo: #6366f1;
  --accent-cyan: #22d3ee;
  --accent-green: #34d399;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-subtle: rgba(99, 102, 241, 0.15);
  --glow-indigo: 0 0 40px rgba(99, 102, 241, 0.15);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

/* --- Typography --- */
h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  font-size: 40px;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 48px;
}

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

/* --- Nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: var(--font-body);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), #818cf8);
  color: white;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 32px rgba(99, 102, 241, 0.45);
  color: white;
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

/* --- Hero --- */
.hero {
  padding: 120px 0 80px;
  text-align: center;
}

.hero h1 {
  font-size: 56px;
  max-width: 720px;
  margin: 0 auto 20px;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 64px;
}

/* --- Terminal Window --- */
.terminal {
  background: var(--bg-terminal);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--glow-indigo);
  overflow: hidden;
  text-align: left;
  max-width: 720px;
  margin: 0 auto;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  min-height: 280px;
  overflow-x: auto;
}

.terminal-line {
  white-space: pre;
}

.terminal-line .prompt {
  color: var(--accent-green);
}

.terminal-line .command {
  color: var(--text-primary);
}

.terminal-line .output {
  color: var(--text-secondary);
}

.terminal-line .highlight {
  color: var(--accent-cyan);
}

.terminal-line .success {
  color: var(--accent-green);
}

.terminal-line .accent {
  color: var(--accent-indigo);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent-cyan);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* --- Problem Section --- */
.problem {
  text-align: center;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.problem-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: left;
}

.problem-card .card-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.problem-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.problem-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* --- Steps Section --- */
.steps {
  text-align: center;
}

.steps-timeline {
  max-width: 640px;
  margin: 48px auto 0;
  text-align: left;
  position: relative;
}

.steps-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-indigo), var(--accent-cyan));
  opacity: 0.3;
}

.step-item {
  display: flex;
  gap: 24px;
  margin-bottom: 36px;
  position: relative;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-indigo);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step-content h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.step-content code {
  font-family: var(--font-mono);
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* --- Live Demo Section --- */
.demo {
  text-align: center;
}

.demo .terminal {
  max-width: 800px;
}

.demo .terminal-body {
  min-height: 400px;
}

/* --- Features Section --- */
.features {
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: left;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--glow-indigo);
}

.feature-card .card-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

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

/* --- Getting Started Section --- */
.getting-started {
  text-align: center;
}

.install-block {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  max-width: 600px;
  margin: 0 auto 32px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  line-height: 2;
  overflow-x: auto;
}

.install-block .comment {
  color: var(--text-muted);
}

.install-block .prompt-symbol {
  color: var(--accent-green);
  user-select: none;
}

/* --- Footer --- */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-trust {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-green);
  margin-bottom: 12px;
}

.trust-text {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

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

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 12px;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 13px;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1023px) {
  h2 {
    font-size: 32px;
  }

  .hero h1 {
    font-size: 44px;
  }

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

@media (max-width: 767px) {
  section {
    padding: 64px 0;
  }

  h2 {
    font-size: 28px;
  }

  .hero {
    padding: 80px 0 48px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

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

  .terminal {
    max-width: 100%;
  }

  .terminal-body {
    font-size: 12px;
    overflow-x: auto;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .steps-timeline {
    padding-left: 0;
  }
}
