/* ============================================
   QUEZIFY WAITLIST - B2B DESIGN SYSTEM
   AI-Powered Survey Creation & Analytics Platform
   ============================================ */

:root {
  /* B2B Color Palette - Professional Blue, Purple, Black */
  --primary-blue: #2563eb;
  --primary-blue-dark: #1e40af;
  --primary-blue-light: #3b82f6;

  --secondary-purple: #7c3aed;
  --secondary-purple-dark: #6d28d9;
  --secondary-purple-light: #8b5cf6;

  --accent-blue: #0ea5e9;
  --accent-purple: #a855f7;

  --neutral-black: #0f172a;
  --neutral-gray-900: #1e293b;
  --neutral-gray-800: #334155;
  --neutral-gray-700: #475569;
  --neutral-gray-600: #64748b;
  --neutral-gray-500: #94a3b8;
  --neutral-gray-400: #cbd5e1;
  --neutral-gray-300: #e2e8f0;
  --neutral-gray-200: #f1f5f9;
  --neutral-gray-100: #f8fafc;

  --white: #ffffff;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --gradient-accent: linear-gradient(135deg, #0ea5e9 0%, #a855f7 100%);
  --gradient-subtle: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-white: #ffffff;

  /* Borders & Shadows */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-blue: 0 10px 30px -5px rgba(37, 99, 235, 0.3);
  --shadow-purple: 0 10px 30px -5px rgba(124, 58, 237, 0.3);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 5rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* ============================================
   LAYOUT - SPLIT DESIGN
   ============================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
  min-height: 100vh;
  padding: 2rem 0;
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Left Column - Hero Content */
.hero-left {
  padding-right: var(--spacing-xl);
  padding-left: 3.5rem;
}

/* Right Column - Form Card */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobile: Stack vertically */
@media (max-width: 968px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
    min-height: auto;
    padding: var(--spacing-xl) 0;
  }

  .hero-left {
    padding-right: 0;
    padding-left: 0;
    text-align: center;
  }

  .hero-right {
    order: -1;
    /* Form first on mobile */
  }
}

/* ============================================
   BADGE/TAG
   ============================================ */

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: var(--spacing-md);
  animation: fadeInDown 0.6s ease;
}

.badge-icon {
  font-size: 1.125rem;
}

@media (max-width: 968px) {
  .platform-badge {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================
   SOCIAL PROOF
   ============================================ */

.social-proof {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin: 0 0 2rem 0;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.avatar-group {
  display: flex;
  align-items: center;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  border: 3px solid white;
  margin-left: -10px;
  position: relative;
  transition: transform 0.2s ease, z-index 0.2s ease;
}

.avatar:first-child {
  margin-left: 0;
}

.avatar:hover {
  transform: translateY(-2px) scale(1.05);
  z-index: 10;
}

/* Avatar Gradients */
.avatar-1 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.avatar-2 {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.avatar-3 {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.avatar-4 {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  font-size: 0.7rem;
}

.social-stats {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.social-stats strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.join-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (max-width: 968px) {
  .social-proof {
    justify-content: center;
  }
}

/* ============================================
   BENEFITS LIST
   ============================================ */

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: 0;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 968px) {
  .benefits-list {
    align-items: center;
  }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

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

/* ============================================
   TYPOGRAPHY
   ============================================ */

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: var(--spacing-md);
  animation: fadeInDown 0.6s ease;
}

.logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  letter-spacing: -0.02em;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  color: var(--neutral-black);
  animation: fadeInUp 0.6s ease 0.1s backwards;
  letter-spacing: -0.02em;
}

h1 .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.55;
  animation: fadeInUp 0.6s ease 0.2s backwards;
  max-width: 600px;
}

@media (max-width: 968px) {

  h1,
  .subtitle {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================
   WAITLIST FORM CARD
   ============================================ */

.waitlist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.15), 0 8px 16px -8px rgba(0, 0, 0, 0.08);
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease 0.3s backwards;
  transition: all var(--transition-normal);
}

@media (min-width: 1024px) {
  .waitlist-card {
    padding: 2.5rem;
  }
}

.waitlist-card:hover {
  box-shadow: 0 24px 70px -12px rgba(0, 0, 0, 0.18), 0 10px 20px -8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.form-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: var(--spacing-md);
  animation: bounce 1s ease infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.form-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-logo-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.form-logo-text {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
}

.form-title {
  font-size: 2.675rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
  color: var(--neutral-black);
}

.form-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.8rem;
  line-height: 1.5;
}

.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

.lock-icon {
  font-size: 1rem;
  opacity: 0.7;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  transition: color var(--transition-fast);
}

input,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  outline: none;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

input::placeholder {
  color: var(--text-muted);
}

input:hover,
select:hover {
  border-color: var(--border-medium);
}

input:focus,
select:focus {
  background: var(--white);
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input.error,
select.error {
  border-color: #dc2626;
  animation: shake 0.4s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-8px);
  }

  75% {
    transform: translateX(8px);
  }
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  display: none;
  animation: fadeIn 0.3s ease;
}

.error-message.show {
  display: block;
}

/* ============================================
   OPTIONAL FEATURE REQUEST SECTION
   ============================================ */

.optional-section {
  margin-top: var(--spacing-sm);
  margin-bottom: 1.25rem;
}

/* ============================================
   CHECKBOX WRAPPER - PROPER ALIGNMENT
   ============================================ */

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.checkbox-wrapper input[type="checkbox"] {
  margin-top: 0.125rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--primary-blue);
}

.checkbox-wrapper label {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.checkbox-wrapper:hover label {
  color: var(--text-primary);
}

/* Legacy checkbox styles for optional section */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  padding: var(--spacing-sm) 0;
  user-select: none;
}

.feature-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-blue);
}

.checkbox-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.checkbox-container:hover .checkbox-label {
  color: var(--primary-blue);
}

.optional-fields {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
  opacity: 0;
}

.optional-fields.show {
  max-height: 600px;
  opacity: 1;
  margin-top: var(--spacing-md);
}

.optional-intro {
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
  margin-bottom: var(--spacing-sm);
  text-align: center;
}

textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  outline: none;
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

textarea::placeholder {
  color: #94a3b8;
  font-size: 0.9rem;
  opacity: 0.7;
}

textarea:hover {
  border-color: var(--border-medium);
}

textarea:focus {
  background: var(--white);
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   BUTTON
   ============================================ */

.submit-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-white);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: var(--spacing-sm);
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-slow);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:active {
  transform: translateY(0);
}

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

.submit-btn.loading {
  pointer-events: none;
}

.submit-btn .btn-text {
  display: inline-block;
  transition: opacity var(--transition-fast);
}

.submit-btn.loading .btn-text {
  opacity: 0;
}

.submit-btn .spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.submit-btn.loading .spinner {
  display: block;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ============================================
   SUCCESS/ERROR MESSAGES
   ============================================ */

.message {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  display: none;
  animation: slideInUp 0.4s ease;
}

.message.show {
  display: block;
}

.message.success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

.message.error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-2xl);
  padding: var(--spacing-xl) 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  transition: all var(--transition-normal);
  animation: fadeInUp 0.6s ease backwards;
}

.feature-card:nth-child(1) {
  animation-delay: 0.4s;
}

.feature-card:nth-child(2) {
  animation-delay: 0.5s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.6s;
}

.feature-card:nth-child(4) {
  animation-delay: 0.7s;
}

.feature-card:hover {
  border-color: var(--primary-blue);
  transform: translateY(-8px);
  box-shadow: var(--shadow-blue);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  display: inline-block;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  color: var(--neutral-black);
}

.feature-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .hero-section {
    padding: var(--spacing-2xl) 0;
  }

  .waitlist-card {
    padding: var(--spacing-lg);
  }

  .features {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --spacing-3xl: 3rem;
  }

  .waitlist-card {
    padding: var(--spacing-md);
  }

  input {
    font-size: 16px;
    /* Prevents zoom on iOS */
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}