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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

::selection { background-color: #dbeafe; color: #1e3a8a; }

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s;
  padding: 1rem 0;
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  background-color: #2563eb;
  padding: 0.375rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.025em;
}

nav { display: flex; gap: 2rem; }
nav a { font-size: 0.875rem; font-weight: 500; color: #475569; text-decoration: none; transition: color 0.2s; }
nav a:hover { color: #2563eb; }

.btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  display: inline-block;
}

.btn-primary { background-color: #2563eb; color: white; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.btn-primary:hover { background-color: #1d4ed8; box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }
.btn-secondary { background-color: white; color: #334155; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.btn-secondary:hover { background-color: #f8fafc; color: #0f172a; }

.mobile-menu-btn { display: none; background: none; border: none; color: #475569; cursor: pointer; padding: 0.5rem; }

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid #f1f5f9;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 1rem; font-weight: 500; color: #475569; padding: 0.5rem; text-decoration: none; }

/* Hero Section */
.hero {
  position: relative;
  padding: 5.5rem 1rem 2rem;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at top right, #dbeafe, #f8fafc 50%);
  z-index: -1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.pulse-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background-color: #2563eb;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.gradient-text {
  background: linear-gradient(to right, #2563eb, #4f46e5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: #475569;
  max-width: 42rem;
  margin: 0.5rem auto 1.5rem;
  line-height: 1.5;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem auto 2rem;
  max-width: 28rem;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.hero-feature { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-feature svg { width: 1.75rem; height: 1.75rem; color: #2563eb; margin-bottom: 0.25rem; }
.hero-feature-title { font-weight: 700; color: #0f172a; font-size: 0.875rem; margin-bottom: 0.125rem; }
.hero-feature-subtitle { font-size: 0.6875rem; color: #64748b; }

/* Section Styles */
section {
  padding: 2rem 1rem;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin-bottom: 0.375rem;
}

.section-subtitle {
  font-size: 1rem;
  color: #475569;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Visualizer */
.visualizer {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f1f5f9;
  padding: 1.25rem;
  margin: 1rem auto;
  max-width: 1280px;
}

.flow-row { margin-bottom: 1.25rem; }

.flow-label {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.flow-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.flow-badge.before { background-color: #fee2e2; color: #991b1b; }
.flow-badge.after { background-color: #d1fae5; color: #065f46; }

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 2px dashed #e2e8f0;
}

.flow-diagram.before {
  background-color: #f8fafc;
  opacity: 0.7;
  filter: grayscale(50%);
  transition: all 0.5s;
}
.flow-diagram.before:hover { filter: grayscale(0%); opacity: 1; }
.flow-diagram.after { background-color: #eff6ff; border-color: #93c5fd; }

.flow-node { display: flex; flex-direction: column; align-items: center; text-align: center; }

.flow-icon {
  width: 2.5rem; height: 2.5rem;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  margin-bottom: 0.25rem;
}

.flow-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.stat-card {
  background: white;
  padding: 0.375rem;
  border-radius: 0.375rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.stat-value { font-size: 1.125rem; font-weight: 700; color: #0f172a; }
.stat-label { font-size: 0.6875rem; color: #64748b; text-transform: uppercase; font-weight: 500; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 1280px;
  margin: 0 auto;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  position: relative;
}

.card:hover { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }

.card-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-title { font-size: 1.125rem; font-weight: 700; color: #0f172a; margin-bottom: 0.375rem; }
.card-text { color: #475569; line-height: 1.6; }

/* Footer */
footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 2rem 1rem;
  border-top: 1px solid #1e293b;
}

.footer-content { max-width: 1280px; margin: 0 auto; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-title { color: white; font-weight: 600; margin-bottom: 0.75rem; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 0.375rem; }
footer a { color: #94a3b8; text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
footer a:hover { color: #60a5fa; }

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p { font-size: 0.75rem; }
.footer-links { display: flex; gap: 1.5rem; font-size: 0.75rem; }

/* Responsive */
@media (max-width: 768px) {
  nav, .desktop-btn { display: none; }
  .mobile-menu-btn { display: block; }
  .hero { padding: 4.5rem 1rem 1.5rem; }
  .hero-buttons { flex-direction: column; }
  section { padding: 1.5rem 1rem; }
  .visualizer { padding: 0.75rem; }
  .flow-diagram { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (min-width: 640px) {
  .hero-buttons { flex-direction: row; }
}

@media (min-width: 768px) {
  .hero { padding: 6.5rem 2rem 2.5rem; }
}
