/* === Complaint Generator — Modern Redesign === */
:root {
  /* Primary palette - calm professional */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;

  /* Neutral palette - slate */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Semantic colors */
  --success-500: #22c55e;
  --success-600: #16a34a;
  --error-500: #ef4444;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--slate-900);
}

.logo-icon {
  font-size: 1.5rem;
}

.nav-cta {
  padding: 10px 20px;
  background: var(--primary-600);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-cta:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 120px 0 80px;
  background: linear-gradient(135deg, #0f1729 0%, #1a1f3a 40%, #2d1b69 100%);
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(99,102,241,0.4) 0, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139,92,246,0.3) 0, transparent 50%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  text-align: left;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success-500);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
}

/* Hero Chat Bubbles */
.hero-chat {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: fadeInUp 0.6s ease both;
}

.chat-bubble.chat-user {
  animation-delay: 0.2s;
}

.chat-bubble.chat-ai {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
}

.chat-text {
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.chat-user .chat-text {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  border-bottom-left-radius: 4px;
  backdrop-filter: blur(8px);
}

.chat-ai .chat-text {
  background: rgba(255,255,255,0.95);
  color: var(--slate-800);
  border-bottom-left-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.chat-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: var(--primary-50);
  color: var(--primary-700);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--primary-600);
  color: white;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.125rem;
}

.btn-submit {
  width: 100%;
  padding: 18px;
  background: var(--success-600);
  color: white;
  font-size: 1.125rem;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4);
}

.btn-submit:hover:not(:disabled) {
  background: var(--success-500);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.5);
}

.btn-submit:disabled {
  background: var(--slate-400);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Document Types */
.doc-types {
  padding: 80px 0;
  background: white;
}

.section-title {
  text-align: center;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  font-size: 1.0625rem;
  color: var(--slate-500);
  margin-bottom: 48px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.doc-card {
  padding: 20px;
  background: white;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.doc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.doc-card:hover {
  border-color: var(--primary-300);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.doc-card:hover::before {
  opacity: 1;
}

.doc-card.active {
  border-color: var(--primary-600);
  background: var(--primary-50);
}

.doc-card.active::before {
  opacity: 1;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
}

.doc-card.active .doc-icon {
  transform: scale(1.1);
}

.doc-icon {
  font-size: 1.75rem;
  margin-bottom: 12px;
  transition: transform var(--transition-base);
}

.doc-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.doc-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 6px;
  line-height: 1.3;
}

.doc-card p {
  font-size: 0.8125rem;
  color: var(--slate-500);
  margin-bottom: 12px;
  line-height: 1.4;
}

.doc-price {
  display: inline-block;
  padding: 4px 12px;
  background: var(--slate-100);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
}

.doc-card.active .doc-price {
  background: var(--primary-600);
  color: white;
}

/* How It Works */
.how-it-works {
  padding: 80px 0;
  background: var(--slate-50);
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

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

.step-number {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 24px;
  height: 24px;
  background: var(--primary-600);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon-circle {
  position: relative;
  width: 80px;
  height: 80px;
  background: white;
  border: 2px solid var(--slate-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-md);
}

.step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.step p {
  font-size: 0.875rem;
  color: var(--slate-500);
  line-height: 1.6;
}

.step-arrow {
  font-size: 1.5rem;
  color: var(--slate-300);
  font-weight: 300;
}

/* Examples Section */
.examples-section {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--slate-50) 0%, white 100%);
}

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

.example-card {
  padding: 32px;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
  position: relative;
}

.example-card:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.example-icon {
  font-size: 2.25rem;
  margin-bottom: 16px;
}

.example-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.example-desc {
  font-size: 0.9375rem;
  color: var(--slate-500);
  line-height: 1.5;
  margin-bottom: 16px;
}

.example-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary-50);
  color: var(--primary-700);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: white;
  color: var(--primary-600);
  border: 1.5px solid var(--primary-300);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.example-soon {
  display: inline-block;
  padding: 10px 20px;
  background: var(--slate-100);
  color: var(--slate-400);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Form Section */
.form-section {
  padding: 80px 0;
  background: white;
}

.form-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.form-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.form-header p {
  color: var(--slate-500);
}

.claim-form {
  padding: 40px;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--slate-800);
  background: white;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px var(--primary-100);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--slate-400);
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▼';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--slate-500);
  pointer-events: none;
}

.form-group select {
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.textarea-wrapper {
  position: relative;
}

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

.char-count {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 0.75rem;
  color: var(--slate-400);
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.form-hint {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--slate-500);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--slate-500);
}

.badge svg {
  flex-shrink: 0;
}

/* Form Message */
.form-message {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 500;
}

.form-message.success {
  background: #f0fdf4;
  color: var(--success-600);
  border: 1px solid #bbf7d0;
}

.form-message.error {
  background: #fef2f2;
  color: var(--error-500);
  border: 1px solid #fecaca;
}

.form-message.hidden,
.hidden {
  display: none !important;
}

/* Trust Section */
.trust-section {
  padding: 80px 0;
  background: var(--slate-50);
}

.trust-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.trust-text h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 32px;
}

.trust-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.trust-list li {
  display: flex;
  gap: 16px;
}

.trust-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--success-500);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-list strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.trust-list p {
  font-size: 0.875rem;
  color: var(--slate-500);
  line-height: 1.5;
}

/* Document Preview Animation */
.trust-visual {
  display: flex;
  justify-content: center;
}

.doc-preview {
  width: 280px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: rotate(-3deg);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-10px); }
}

.doc-header {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: var(--slate-100);
  border-bottom: 1px solid var(--slate-200);
}

.doc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.doc-dot.red { background: #ef4444; }
.doc-dot.yellow { background: #eab308; }
.doc-dot.green { background: #22c55e; }

.doc-content {
  padding: 20px;
}

.doc-line {
  height: 10px;
  background: var(--slate-200);
  border-radius: 5px;
  margin-bottom: 10px;
  animation: shimmer 2s infinite;
}

.doc-line.title {
  width: 60%;
  height: 14px;
  background: var(--slate-300);
  margin-bottom: 20px;
}

.doc-line.short {
  width: 40%;
}

.doc-gap {
  height: 20px;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Footer */
.footer {
  padding: 48px 0;
  background: var(--slate-900);
}

.footer-content {
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  margin-bottom: 20px;
}

.footer-legal {
  max-width: 600px;
  margin: 0 auto 16px;
  font-size: 0.75rem;
  color: var(--slate-400);
  line-height: 1.6;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--slate-500);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 100px 0 60px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-content {
    text-align: center;
  }

  .hero-stats {
    gap: 20px;
    justify-content: center;
  }

  .stat-divider {
    display: none;
  }

  .stat {
    flex: 1;
    min-width: 100px;
  }

  .steps {
    flex-direction: column;
  }

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

  .examples-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .example-card {
    padding: 24px;
  }

  .claim-form {
    padding: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .trust-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .trust-visual {
    order: -1;
  }

  .trust-list li {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 1024px) {
  .doc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .trust-badges {
    flex-direction: column;
    gap: 12px;
  }
}
