/* Self-hosted Inter (latin subset) — replaces Google Fonts for privacy + speed */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-v20-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-v20-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-v20-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/inter-v20-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/inter-v20-latin-800.woff2') format('woff2'); }

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

/* Visually hidden but accessible to screen readers and search engines */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;
  --secondary-500: #a855f7;
  --secondary-600: #9333ea;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --green-500: #10b981;
  --green-50: #f0fdf4;
  --green-200: #bbf7d0;
  --green-800: #166534;
  --red-50: #fef2f2;
  --red-300: #fca5a5;
  --red-800: #991b1b;
  --yellow-50: #fffbeb;
  --yellow-200: #fde68a;
  --yellow-300: #fcd34d;
  --yellow-800: #92400e;
  --blue-50: #eff6ff;
  --blue-600: #2563eb;
  --amber-50: #fffbeb;
  --amber-600: #d97706;
  --green-600: #059669;
  --green-900: #14532d;
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--gray-900);
}

.logo img { width: 40px; height: 40px; }
.logo span { font-size: 1.25rem; font-weight: 700; }

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

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

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

.nav-links a.nav-demo-btn,
.nav-links a.nav-demo-btn:hover {
  display: inline-block;
  padding: 0.5rem 1.125rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 800;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.nav-demo-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.hamburger { display: none; }

/* Hero shared */
.hero-bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}

.hero-bg-circle-1 {
  width: 500px; height: 500px;
  background: var(--primary-200);
  top: -100px; right: -100px;
}

.hero-bg-circle-2 {
  width: 400px; height: 400px;
  background: #e9d5ff;
  bottom: -100px; left: -100px;
}

/* Section shared */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-secondary {
  background: #fff;
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-50);
  transform: translateY(-1px);
}

/* Forms */
.form-group { margin-bottom: 1.5rem; }

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--gray-900);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2.5rem;
  background: var(--primary-600);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.form-submit:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.form-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  display: none;
}

.form-message.success {
  display: block;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-800);
}

.form-message.error {
  display: block;
  background: var(--red-50);
  border: 1px solid var(--red-300);
  color: var(--red-800);
}

/* Footer */
.footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-top: 0.75rem;
  max-width: 320px;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.footer-social a {
  color: var(--gray-500);
  transition: color 0.2s;
}

.footer-social a:hover { color: var(--primary-600); }
.footer-social svg { width: 20px; height: 20px; }

.footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.625rem; }

.footer-col a {
  font-size: 0.875rem;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--primary-600); }

.footer-bottom {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

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

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

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

/* Shared fade-in-up (pipeline/faq use this class name) */
@keyframes fadeInUpAlt {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUpAlt 0.6s ease-out forwards;
  opacity: 0;
}

/* Responsive - shared rules */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
    z-index: 100;
  }
  .nav-links.open li a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 1rem;
  }
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }
  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.2s;
  }
  .header { position: relative; }
  .nav-links.open li a.nav-demo-btn {
    background: none;
    color: var(--primary-600) !important;
    padding: 0.75rem 0;
    border-radius: 0;
    font-weight: 700;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Coming Soon Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 1rem;
  padding: 2.5rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
}

.modal-overlay.open .modal {
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  padding: 0.25rem;
  line-height: 1;
}

.modal-close:hover { color: var(--gray-900); }
.modal-close svg { width: 20px; height: 20px; }

.modal h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.modal p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-form {
  display: flex;
  gap: 0.5rem;
}

.modal-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--gray-900);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-form input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.modal-form button {
  padding: 0.75rem 1.5rem;
  background: var(--primary-600);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.modal-form button:hover { background: var(--primary-700); }

.modal-message {
  margin-top: 1rem;
  font-size: 0.875rem;
  display: none;
}

.modal-message.success {
  display: block;
  color: var(--green-800);
}

.modal-message.error {
  display: block;
  color: var(--red-800);
}

@media (max-width: 768px) {
  .modal { padding: 2rem 1.5rem; }
  .modal-form { flex-direction: column; }
  .modal-form button { width: 100%; }
}

/* Respect users who ask for reduced motion. Animations are made effectively
   instant (not removed) so opacity-based reveals still finish visible. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .animate-in,
  .fade-in-up { opacity: 1 !important; }
}
