/* CSS Variables for consistency */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --bg: #ffffff;
  --bg-light: #f9fafb;
  --bg-dark: #111827;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

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

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

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn-nav {
  background: white;
  color: var(--primary);
  padding: 10px 20px;
}

.btn-nav:hover {
  background: var(--bg-light);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--primary);
  transition: all var(--transition);
}

.nav.scrolled {
  box-shadow: var(--shadow-lg);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: white;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-link:hover {
  color: white;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  transition: all var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  z-index: -1;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  text-align: center;
  color: white;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  opacity: 0.9;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.hero .btn-outline:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 16px;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
}

/* Features */
.features {
  background: var(--bg-light);
}

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

.feature-card {
  background: white;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-desc {
  color: var(--text-light);
  font-size: 0.9375rem;
}

/* How It Works */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}

.step {
  flex: 1;
  max-width: 280px;
  text-align: center;
}

.step-number {
  width: 64px;
  height: 64px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 24px;
}

.step-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.step-desc {
  color: var(--text-light);
  font-size: 0.9375rem;
}

.step-arrow {
  display: flex;
  align-items: center;
  padding-top: 20px;
}

.step-arrow svg {
  width: 32px;
  height: 32px;
  color: var(--text-lighter);
}

/* Before/After Comparison */
.comparison {
  background: var(--bg-light);
}

.comparison-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.comparison-tab {
  padding: 12px 24px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.comparison-tab:hover {
  border-color: var(--primary-light);
}

.comparison-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.comparison-container {
  position: relative;
}

.comparison-item {
  display: none;
  text-align: center;
}

.comparison-item.active {
  display: block;
}

.comparison-caption {
  margin-top: 24px;
  color: var(--text-light);
  font-size: 1rem;
}

/* Before/After Slider */
.before-after-slider {
  position: relative;
  width: 389px;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}

.before-after-slider img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.after-image {
  position: relative;
  width: 100%;
}

.after-image img {
  display: block;
  width: 100%;
  height: auto;
}

.before-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  clip-path: inset(0 50% 0 0);
}

.before-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Image Labels */
.image-label {
  position: absolute;
  bottom: 20px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.image-label-before {
  left: 20px;
}

.image-label-after {
  right: 20px;
}

/* Slider Handle */
.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}

.slider-line {
  flex: 1;
  width: 4px;
  background: white;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.slider-button {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.slider-button svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.before-after-slider:hover .slider-button,
.before-after-slider:active .slider-button {
  transform: scale(1.1);
}

/* Slider interaction hint animation */
@keyframes slider-hint {
  0%,
  100% {
    left: 50%;
  }
  25% {
    left: 45%;
  }
  75% {
    left: 55%;
  }
}

.before-after-slider.hint .slider-handle {
  animation: slider-hint 1.5s ease-in-out;
}

.before-after-slider.hint .before-image {
  animation: before-hint 1.5s ease-in-out;
}

@keyframes before-hint {
  0%,
  100% {
    clip-path: inset(0 50% 0 0);
  }
  25% {
    clip-path: inset(0 55% 0 0);
  }
  75% {
    clip-path: inset(0 45% 0 0);
  }
}

/* Pricing */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.billing-label {
  font-size: 15px;
  color: var(--text-light);
}

.savings-badge {
  background: #dcfce7;
  color: #16a34a;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.toggle {
  position: relative;
  width: 52px;
  height: 28px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 28px;
  cursor: pointer;
  transition: all var(--transition);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: all var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch;
}

.pricing-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow);
  position: relative;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

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

.pricing-card.popular {
  border: 2px solid var(--primary);
  transform: scale(1.05);
}

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

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.pricing-header {
  text-align: center;
  margin-bottom: 24px;
}

.pricing-name {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.pricing-desc {
  color: var(--text-light);
  font-size: 0.9375rem;
}

.pricing-price {
  text-align: center;
  margin-bottom: 32px;
}

.price-currency {
  font-size: 1.5rem;
  font-weight: 600;
  vertical-align: top;
}

.price-amount {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
}

.price-period {
  color: var(--text-light);
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
  flex-grow: 1;
}

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

.pricing-features svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  stroke-width: 2.5;
  fill: none;
  flex-shrink: 0;
}

.pricing-note {
  text-align: center;
  margin-top: 40px;
  color: var(--text-light);
}

.pricing-note a {
  color: var(--primary);
  font-weight: 500;
}

/* Testimonials */
.testimonials {
  background: var(--bg-light);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.testimonial-card {
  background: white;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.testimonial-text {
  font-size: 1.0625rem;
  margin-bottom: 24px;
  font-style: italic;
  color: var(--text);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.author-role {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* CTA Section */
.cta {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  text-align: center;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

.cta .btn-primary {
  background: white;
  color: var(--primary);
}

.cta .btn-primary:hover {
  background: var(--bg-light);
}

.cta-note {
  margin-top: 16px;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact-item {
  display: flex;
  gap: 16px;
}

.contact-item svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.contact-item a,
.contact-item p {
  color: var(--text-light);
  font-size: 0.9375rem;
}

.contact-item a:hover {
  color: var(--primary);
}

.contact-form {
  background: var(--bg-light);
  padding: 40px;
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9375rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

/* Form Success Message */
.form-success {
  display: none;
  text-align: center;
  padding: 40px;
}

.form-success.show {
  display: block;
}

.form-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-success-icon svg {
  width: 32px;
  height: 32px;
  stroke: white;
  stroke-width: 3;
  fill: none;
}

.form-success h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text);
}

.form-success p {
  color: var(--text-light);
  margin-bottom: 24px;
}

.contact-form.hidden {
  display: none;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-lighter);
  font-size: 0.9375rem;
  max-width: 280px;
}

.footer-links h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  color: var(--text-lighter);
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  margin-bottom: 12px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-lighter);
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .features-grid,
  .pricing-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right var(--transition);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-stats {
    gap: 32px;
  }

  .stat-value {
    font-size: 2rem;
  }

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

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

  .step-arrow {
    transform: rotate(90deg);
    padding: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .comparison-tabs {
    flex-wrap: wrap;
  }

  .slider-button {
    width: 40px;
    height: 40px;
  }

  .slider-button svg {
    width: 20px;
    height: 20px;
  }

  .image-label {
    font-size: 12px;
    padding: 6px 12px;
    bottom: 12px;
  }

  .image-label-before {
    left: 12px;
  }

  .image-label-after {
    right: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 60px 0;
  }

  .hero {
    padding: 100px 0 60px;
  }

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

  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
  }

  .pricing-card {
    padding: 32px 24px;
  }

  .contact-form {
    padding: 24px;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Print styles */
@media print {
  .nav,
  .hero-cta,
  .billing-toggle,
  .comparison-tabs,
  .contact-form,
  .footer {
    display: none;
  }
}
