/* ============================================
   SparkLink – Professional Email SaaS
   Enterprise-grade, modern, premium design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors – light theme */
  --color-bg: #f8fafc;
  --color-bg-alt: #ffffff;
  --color-bg-dark: #0f172a;
  --color-bg-dark-soft: #1e293b;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-text-inverse: #f8fafc;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-accent: #0ea5e9;
  --color-success: #10b981;
  --color-border: #e2e8f0;
  --color-border-dark: #334155;
  /* Shadows & depth */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  /* Spacing & layout */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --container-max: 1200px;
  --container-narrow: 720px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  /* Transitions */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --transition-fast: 0.15s var(--ease-out);
  --transition-normal: 0.25s var(--ease-out);
  --transition-slow: 0.4s var(--ease-out);
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary-hover); }
ul, ol { padding-left: var(--space-lg); }

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}
.container--narrow { max-width: var(--container-narrow); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  animation: fadeInDown 0.5s var(--ease-out);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.logo {
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.logo span { color: var(--color-primary); }
.nav-main {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-main a {
  color: var(--color-text);
  font-weight: 500;
  font-size: var(--text-sm);
}
.nav-main a:hover { color: var(--color-primary); }
/* Request Account button: ensure text and background never merge (override nav link color) */
.nav-main a.btn--primary {
  color: #fff !important;
  background: var(--color-primary);
}
.nav-main a.btn--primary:hover {
  color: #fff !important;
  background: var(--color-primary-hover);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
  border: 1px solid transparent;
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.btn--secondary {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
}
.btn--ghost:hover { background: var(--color-primary-light); color: var(--color-primary); }
.btn--large { padding: 1rem 2rem; font-size: var(--text-base); }
.btn--block { width: 100%; }

/* Footer */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: var(--space-4xl) 0 var(--space-2xl);
  margin-top: var(--space-4xl);
}
.site-footer a { color: rgba(248, 250, 252, 0.85); }
.site-footer a:hover { color: white; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand .logo { color: white; }
.footer-brand .logo span { color: var(--color-accent); }
.footer-brand p {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: rgba(248, 250, 252, 0.7);
  max-width: 280px;
}
.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
  color: rgba(248, 250, 252, 0.9);
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li { margin-bottom: var(--space-sm); }
.footer-col a { font-size: var(--text-sm); }
.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-sm);
  color: rgba(248, 250, 252, 0.6);
}
.footer-legal { display: flex; gap: var(--space-lg); }
.footer-legal a { color: rgba(248, 250, 252, 0.6); }

/* Sections */
.section {
  padding: var(--space-4xl) 0;
  animation: fadeIn 0.6s var(--ease-out);
}
.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}
.section--dark .section-title,
.section--dark .section-subtitle,
.section--dark h2, .section--dark h3 { color: white; }
.section--dark p { color: rgba(248, 250, 252, 0.85); }
.section-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}
.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: var(--space-2xl);
}
.section-header {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-3xl);
}

/* Hero */
.hero {
  padding: var(--space-4xl) 0;
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: radial-gradient(ellipse, var(--color-primary-light) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-3xl);
}
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
}
.hero-content { animation: fadeInUp 0.7s var(--ease-out); }
.hero-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
}
.hero-title {
  font-size: clamp(2rem, 5vw, var(--text-5xl));
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}
.hero-desc {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 480px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.hero-visual {
  position: relative;
  animation: fadeInRight 0.8s var(--ease-out);
}
.hero-visual-inner {
  background: linear-gradient(145deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  position: relative;
}
.hero-visual-inner::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.3;
}
.hero-illus {
  aspect-ratio: 4/3;
  background: linear-gradient(180deg, #dbeafe 0%, #e0e7ff 50%, #f0f9ff 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero-illus-icon {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.hero-illus-dots {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.15;
  top: 20%;
  right: 15%;
}
.hero-illus-dots:nth-of-type(2) {
  width: 40px;
  height: 40px;
  bottom: 25%;
  left: 10%;
  background: var(--color-accent);
}

/* Cards */
.card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}
.card h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}
.card p { color: var(--color-text-muted); font-size: var(--text-sm); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

/* Value props strip */
.value-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--color-border);
}
@media (max-width: 768px) { .value-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .value-strip { grid-template-columns: 1fr; } }
.value-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}
.value-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.value-item h4 { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-xs); }
.value-item p { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; }

/* Trust / compliance strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}
.trust-item svg { flex-shrink: 0; color: var(--color-success); }

/* Pricing cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  align-items: stretch;
}
.pricing-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  border: 1px solid var(--color-border);
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary);
}
.pricing-card--featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}
.pricing-card--featured .pricing-name { color: var(--color-primary); }
.pricing-name { font-weight: 700; font-size: var(--text-lg); margin-bottom: var(--space-sm); }
.pricing-price { font-size: var(--text-3xl); font-weight: 800; margin-bottom: var(--space-xs); }
.pricing-price span { font-size: var(--text-base); font-weight: 500; color: var(--color-text-muted); }
.pricing-desc { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-lg); }
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-xl);
}
.pricing-features li {
  padding: var(--space-sm) 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: var(--text-sm);
}
.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}
.pricing-card .btn { margin-top: auto; }

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}
.testimonial-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-normal);
}
.testimonial-card:hover { transform: translateY(-2px); }
.testimonial-card p {
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  font-style: italic;
}
.testimonial-author { font-weight: 600; font-size: var(--text-sm); }
.testimonial-role { font-size: var(--text-sm); color: var(--color-text-muted); }

/* CTA section */
.cta-section {
  text-align: center;
  padding: var(--space-4xl) var(--space-lg);
  background: linear-gradient(145deg, var(--color-primary) 0%, #1d4ed8 100%);
  color: white;
  border-radius: var(--radius-xl);
  margin: 0 var(--space-lg);
}
.cta-section h2 { color: white; margin-bottom: var(--space-md); }
.cta-section p { color: rgba(255,255,255,0.9); margin-bottom: var(--space-xl); max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-section .btn--primary {
  background: white;
  color: var(--color-primary);
}
.cta-section .btn--primary:hover { background: var(--color-bg); }

/* Page title */
.page-hero {
  padding: var(--space-3xl) 0;
  text-align: center;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.page-hero h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.page-hero p { color: var(--color-text-muted); font-size: var(--text-lg); }

/* Forms */
.form-group {
  margin-bottom: var(--space-lg);
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}
.form-group .helper {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.form-control::placeholder { color: var(--color-text-muted); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { cursor: pointer; appearance: auto; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  cursor: pointer;
}
.form-check input { margin-top: 0.25rem; }
.form-check span { font-size: var(--text-sm); color: var(--color-text-muted); }
.form-check a { text-decoration: underline; }

/* Multi-step form (CSS :target) */
.form-steps-wrapper { max-width: 720px; margin: 0 auto; }
.form-step-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  gap: var(--space-xs);
}
.form-step-nav a {
  flex: 1;
  text-align: center;
  padding: var(--space-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 3px solid var(--color-border);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.form-step-nav a:hover { color: var(--color-primary); }
.form-step-nav a.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.form-steps { position: relative; min-height: 400px; }
.form-step {
  display: none;
  animation: fadeIn 0.35s var(--ease-out);
  padding: var(--space-lg) 0;
  scroll-margin-top: 100px;
}
.form-step:first-of-type { display: block; }
.form-steps:has(#step2:target) .form-step:first-of-type { display: none; }
.form-steps:has(#step3:target) .form-step:first-of-type { display: none; }
.form-steps:has(#step4:target) .form-step:first-of-type { display: none; }
.form-step:target { display: block; }
.form-steps:has(#step3:target) #step2 { display: none; }
.form-steps:has(#step4:target) #step2 { display: none; }
.form-steps:has(#step4:target) #step3 { display: none; }
.form-step:target ~ .form-step { display: none !important; }
.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}
.form-actions .btn { min-width: 120px; }

/* Legal pages */
.legal-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
}
.legal-content h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}
.legal-content h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}
.legal-content p, .legal-content li {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.legal-content ul { margin-bottom: var(--space-lg); }
.legal-content .updated { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-xl); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info h3 { font-size: var(--text-xl); margin-bottom: var(--space-md); }
.contact-info p { color: var(--color-text-muted); margin-bottom: var(--space-lg); }
.contact-details {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-details li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.contact-details strong { min-width: 120px; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.animate-on-scroll { opacity: 0; transform: translateY(16px); }

/* Utility */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: var(--space-xl); }
