/* Modern Stripe-inspired styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --stripe-purple: #635bff;
  --stripe-purple-dark: #4c44db;
  --stripe-purple-light: #f6f9fc;
  --stripe-gray-900: #0a2540;
  --stripe-gray-800: #1a365d;
  --stripe-gray-600: #425466;
  --stripe-gray-500: #6b7c93;
  --stripe-gray-400: #8792a2;
  --stripe-gray-200: #e3e8ee;
  --stripe-gray-100: #f6f9fc;
  --stripe-green: #00d924;
  --stripe-red: #df1b41;
  --stripe-orange: #ff5722;
}

.text-primary-purple {
  color: var(--stripe-purple);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--stripe-gray-900);
  line-height: 1.6;
  background-color: #ffffff;
}

/* Typography */
h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--stripe-gray-900);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--stripe-gray-900);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--stripe-gray-900);
  margin-bottom: 0.5rem;
}

p {
  font-size: 1.125rem;
  color: var(--stripe-gray-600);
  margin-bottom: 1rem;
}

/* Sticky Header */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  background-color: var(--stripe-gray-100);
  border-bottom: 1px solid var(--stripe-gray-200);
  z-index: 9999;
  transition: transform 0.3s ease, height 0.3s ease;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.sticky-header.hidden {
  transform: translateY(-100%);
}

.header-content {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem 0.5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  transition: padding 0.3s ease;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  flex-shrink: 0;
}

/* Header without form visible - compact */
.sticky-header:not(.form-visible) .header-content {
  padding-bottom: 1rem;
}

.sticky-header:not(.form-visible) .header-form {
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Header with form visible - expanded */
.sticky-header.form-visible .header-content {
  padding-bottom: 1rem;
}

.sticky-header.form-visible .header-form {
  margin-top: 0.75rem;
  height: auto;
}

@media (min-width: 768px) {
  .header-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
  }
  
  .header-top {
    margin-bottom: 0;
    height: auto;
  }
  
  .sticky-header:not(.form-visible) .header-content,
  .sticky-header.form-visible .header-content {
    padding: 1rem 1.5rem;
  }
  
  .sticky-header:not(.form-visible) .header-form,
  .sticky-header.form-visible .header-form {
    height: auto;
    margin: 0;
    overflow: visible;
  }
}

.header-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--stripe-gray-900);
  text-decoration: none;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.header-logo:hover {
  color: var(--stripe-purple);
}

.header-logo-img {
  height: 32px;
  width: auto;
  transition: opacity 0.2s ease;
}

.header-logo:hover .header-logo-img {
  opacity: 0.8;
}

.header-cta {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--stripe-purple);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.header-cta:hover {
  background: var(--stripe-purple-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
}

/* Header Form Styles */
.header-form {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.header-form.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.header-form-inner {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.header-email-input {
  padding: 0.5rem 0.75rem;
  font-size: 16px; /* Prevent mobile zoom by using 16px minimum */
  border: 2px solid var(--stripe-gray-400);
  border-radius: 6px;
  flex: 1;
  min-width: 200px;
  transition: all 0.2s ease;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .header-form-inner {
    width: auto;
  }
  
  .header-email-input {
    width: 300px;
    flex: none;
  }
}

.header-email-input:focus {
  outline: none;
  border-color: var(--stripe-purple);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.header-email-input:hover:not(:focus) {
  border-color: var(--stripe-gray-500);
}

.header-submit-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--stripe-purple);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-submit-btn:hover {
  background: var(--stripe-purple-dark);
  transform: translateY(-1px);
}

.header-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Removed default CTA styles - no longer needed */

/* Add top padding to body to account for fixed header */
body {
  padding-top: 70px;
}

/* Layout utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-section {
  background: linear-gradient(135deg, var(--stripe-purple-light) 0%, #ffffff 100%);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 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='%23635bff' fill-opacity='0.05'%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Ccircle cx='51' cy='9' r='2'/%3E%3Ccircle cx='9' cy='51' r='2'/%3E%3Ccircle cx='51' cy='51' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.section {
  padding: 5rem 0;
}

.section-gray {
  background-color: var(--stripe-gray-100);
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--stripe-purple) 0%, var(--stripe-purple-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(99, 91, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(99, 91, 255, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--stripe-purple);
  border: 2px solid var(--stripe-purple);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: var(--stripe-purple-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 2px solid var(--stripe-gray-200);
  border-radius: 8px;
  background: white;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--stripe-purple);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.form-flex {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 800px; 
  margin: 0 auto;
}

/* Grid layouts */
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-flex { flex-direction: column; }
  h1 { font-size: 2rem; }
  .hero-section { padding: 4rem 0; }

  .container {
    padding: 0 1rem;
  }
  
  /* Mobile header adjustments */
  .header-content {
    padding: 0.75rem 1rem;
  }
  
  .header-logo {
    font-size: 1.125rem;
  }
  
  .header-cta {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  /* Mobile header form */
  .header-email-input {
    width: 160px;
    font-size: 16px; /* Prevent mobile zoom by using 16px minimum */
    padding: 0.4rem 0.6rem;
    border-width: 2px;
  }
  
  .header-submit-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  .header-form-inner {
    gap: 0.4rem;
  }
  
  body {
    padding-top: 60px;
  }
}

/* Card styles */
.card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  border: 1px solid var(--stripe-gray-200);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--stripe-purple);
}

.card h3 {
  color: var(--stripe-gray-900);
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--stripe-gray-600);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.card-link {
  color: var(--stripe-purple);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.card-link:hover {
  color: var(--stripe-purple-dark);
}

/* Step indicators */
.step-indicator {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--stripe-purple-light) 0%, rgba(99, 91, 255, 0.1) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--stripe-purple);
}

/* FAQ Styles */
.faq-item {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--stripe-gray-200);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--stripe-gray-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background-color: var(--stripe-gray-100);
}

.faq-icon {
  font-size: 1.5rem;
  color: var(--stripe-purple);
  transition: transform 0.2s ease;
  font-weight: 300;
}

.faq-content {
  color: var(--stripe-gray-600);
  display: none;
  padding: 0 1.5rem 1.5rem;
}

.faq-content.active {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Code blocks */
.code-block {
  background: var(--stripe-gray-900);
  color: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.4;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.code-block .comment {
  color: var(--stripe-gray-400);
  font-style: italic;
}

/* Footer CTA */
.footer-cta {
  background: linear-gradient(135deg, var(--stripe-purple) 0%, var(--stripe-purple-dark) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.footer-cta h2 {
  color: white;
  margin-bottom: 0.5rem;
}

.footer-cta p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

.footer-cta .btn-secondary {
  background: white;
  color: var(--stripe-purple);
  border: none;
}

.footer-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

/* Footer Navigation */
.footer-nav {
  background: var(--stripe-gray-800);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-nav h3 {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--stripe-gray-400);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
  display: block;
  padding: 0.25rem 0;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Footer */
.footer {
  background: var(--stripe-gray-900);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--stripe-gray-600);
}

.footer p {
  color: var(--stripe-gray-500);
  font-size: 0.875rem;
  margin: 0;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 350px;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: var(--stripe-green);
}

.toast.error {
  background: var(--stripe-red);
}

.toast.info {
  background: var(--stripe-purple);
}

@media (max-width: 768px) {
  .toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    transform: translateY(100%);
  }
  
  .toast.show {
    transform: translateY(0);
  }
}

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }

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

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--stripe-purple);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}