/* ── Supabase Connector Landing Page ─────────────────────────────── */
/* Design system: dark mode, glassmorphism, gradients, smooth animations */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  /* Brand */
  --brand-primary: #3ecf8e;
  --brand-primary-light: #62e5a8;
  --brand-primary-dark: #24b47e;
  --brand-secondary: #6c63ff;
  --brand-secondary-light: #918aff;

  /* Surfaces */
  --bg-base: #0d0d0d;
  --bg-surface: #1a1a2e;
  --bg-surface-hover: #222240;
  --bg-card: rgba(30, 30, 55, 0.65);
  --bg-card-hover: rgba(40, 40, 75, 0.75);

  /* Text */
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #68687d;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(62, 207, 142, 0.3);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #3ecf8e 0%, #6c63ff 50%, #e040fb 100%);
  --gradient-card: linear-gradient(145deg, rgba(62, 207, 142, 0.08), rgba(108, 99, 255, 0.08));

  /* Spacing */
  --container: 1200px;
  --section-padding: 100px 0;
  --card-radius: 16px;
  --btn-radius: 10px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(62, 207, 142, 0.15);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

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

/* ── Navigation ──────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(13, 13, 13, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s, padding 0.3s;
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(13, 13, 13, 0.92);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.nav-brand img {
  width: 28px;
  height: 28px;
}

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

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

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

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--btn-radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: #0d0d0d;
  box-shadow: 0 4px 15px rgba(62, 207, 142, 0.3);
}

.btn-primary:hover {
  background: var(--brand-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(62, 207, 142, 0.4);
  color: #0d0d0d;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* ── Hero Section ────────────────────────────────────────────────── */
.hero {
  padding: 180px 0 120px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(62, 207, 142, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(62, 207, 142, 0.1);
  border: 1px solid rgba(62, 207, 142, 0.2);
  color: var(--brand-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  max-width: 800px;
  margin: 0 auto 24px;
  letter-spacing: -1.5px;
}

.hero h1 .gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Features Section ────────────────────────────────────────────── */
.features {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: opacity 0.3s;
}

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

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

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

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

/* ── How It Works ────────────────────────────────────────────────── */
.how-it-works {
  padding: var(--section-padding);
  background: var(--gradient-card);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  counter-reset: step;
}

.step-card {
  text-align: center;
  counter-increment: step;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(62, 207, 142, 0.12);
  border: 2px solid var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Pricing Section ─────────────────────────────────────────────── */
.pricing {
  padding: var(--section-padding);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 40px 32px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.03);
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-primary);
  color: #0d0d0d;
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-4px);
}

.pricing-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 900;
  margin: 16px 0 8px;
  letter-spacing: -2px;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 24px 0 32px;
  padding: 0;
}

.pricing-features li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--brand-primary);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
}

/* ── CTA Section ─────────────────────────────────────────────────── */
.cta {
  padding: var(--section-padding);
  text-align: center;
}

.cta-box {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 64px 32px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(62, 207, 142, 0.1), transparent 70%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-box p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

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

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* ── Docs Page ───────────────────────────────────────────────────── */
.docs-layout {
  padding: 120px 0 80px;
}

.docs-content {
  max-width: 800px;
  margin: 0 auto;
}

.docs-content h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 32px;
}

.docs-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.docs-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.docs-content p,
.docs-content li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.docs-content ul,
.docs-content ol {
  padding-left: 24px;
}

.docs-content code {
  background: rgba(62, 207, 142, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--brand-primary);
}

.docs-content pre {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  margin: 16px 0 24px;
}

.docs-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.docs-content .callout {
  background: rgba(62, 207, 142, 0.06);
  border-left: 3px solid var(--brand-primary);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
}

.docs-content .callout p {
  margin: 0;
}

/* ── Animations ──────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in:nth-child(2) {
  animation-delay: 0.1s;
}

.fade-in:nth-child(3) {
  animation-delay: 0.2s;
}

.fade-in:nth-child(4) {
  animation-delay: 0.3s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.floating {
  animation: float 4s ease-in-out infinite;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    padding: 140px 0 80px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .nav-links {
    display: none;
  }

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

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

  .pricing-card.featured {
    transform: none;
  }

  .pricing-card.featured:hover {
    transform: translateY(-4px);
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Legal Pages (Privacy, Terms) ───────────────────────────────── */
.legal-page {
  padding: 120px 0 80px;
  max-width: 800px;
}

.legal-page h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.legal-page .updated-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 48px;
}

.legal-page section {
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.legal-page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal-page p,
.legal-page li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page code {
  background: rgba(62, 207, 142, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--brand-primary);
}

/* footer used in legal pages (non-.footer class) */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-subtle);
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer .footer-links {
  display: flex;
  gap: 24px;
}

footer .footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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