/* ============================================
   DESIGN SYSTEM TOKENS
   Based on MASTER_UX_DESIGN.md
   ============================================ */

:root {
  /* Primary - Corporate Blue (Trust) */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;
  --primary-950: #082f49;

  /* Navy (Original brand color - keeping for headers) */
  --navy-800: #1e3a5f;
  --navy-900: #1a365d;
  --navy-950: #0f2744;

  /* Gold Accent */
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-600: #d69e2e;

  /* Neutral Grays (Warm) */
  --gray-50: #fafaf9;
  --gray-100: #f5f5f4;
  --gray-200: #e7e5e4;
  --gray-300: #d6d3d1;
  --gray-400: #a8a29e;
  --gray-500: #78716c;
  --gray-600: #57534e;
  --gray-700: #44403c;
  --gray-800: #292524;
  --gray-900: #1c1917;

  /* Semantic Colors */
  --success-50: #f0fdf4;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --success-700: #15803d;
  
  --warning-50: #fffbeb;
  --warning-500: #f59e0b;
  
  --error-500: #ef4444;
  --error-600: #dc2626;

  /* Typography Scale */
  --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;

  /* Spacing Scale (8px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Shadows */
  --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 -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
}

/* ============================================
   BASE RESET & TYPOGRAPHY
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: 1.2;
  color: var(--gray-900);
}

p {
  margin: 0 0 var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--primary-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
  color: var(--gray-900);
}

/* ============================================
   LAYOUT
   ============================================ */

main,
header,
footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (min-width: 768px) {
  main,
  header,
  footer {
    padding: 0 var(--space-8);
  }
}

/* ============================================
   HERO / HEADER
   ============================================ */

header {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: white;
  padding: var(--space-12) var(--space-6) var(--space-10);
  text-align: left;
  position: relative;
  overflow: hidden;
}

/* Subtle pattern overlay */
header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.03) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.02) 0%, transparent 40%);
  pointer-events: none;
}

header > * {
  position: relative;
  z-index: 1;
}

header h1 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: white;
  max-width: 600px;
  line-height: 1.15;
}

@media (min-width: 768px) {
  header h1 {
    font-size: var(--text-4xl);
  }
}

header p {
  margin: 0;
  font-size: var(--text-lg);
  max-width: 580px;
  color: var(--gray-300);
  line-height: 1.7;
}

.trust-line {
  margin-top: var(--space-6) !important;
  font-size: var(--text-sm);
  color: var(--success-500);
  letter-spacing: 0.01em;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .trust-line {
    flex-direction: column;
    gap: var(--space-2);
  }
}

/* ============================================
   MAIN CONTENT
   ============================================ */

main {
  padding: var(--space-10) var(--space-6) var(--space-16);
}

@media (min-width: 768px) {
  main {
    padding: var(--space-12) var(--space-8) var(--space-20);
  }
}

/* ============================================
   SECTIONS (Cards)
   ============================================ */

section {
  background-color: white;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-8);
  border: 1px solid var(--gray-200);
}

@media (min-width: 768px) {
  section {
    padding: var(--space-10);
  }
}

section:last-child {
  margin-bottom: 0;
}

section h2 {
  margin-top: 0;
  margin-bottom: var(--space-6);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gray-900);
  position: relative;
  padding-bottom: var(--space-4);
}

section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500) 0%, var(--gold-400) 100%);
  border-radius: var(--radius-full);
}

section p {
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: 1.7;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
  background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
  border-left: 4px solid var(--gold-500);
}

.about-section p {
  margin-bottom: var(--space-4);
}

.about-section strong {
  color: var(--navy-900);
}

/* ============================================
   PROBLEM SECTION
   ============================================ */

.problem-section {
  background: linear-gradient(135deg, var(--warning-50) 0%, white 100%);
  border-left: 4px solid var(--warning-500);
}

.problem-section p {
  margin-bottom: var(--space-4);
}

.problem-section em {
  font-style: normal;
  color: var(--gray-900);
  font-weight: 500;
}

/* ============================================
   HOW IT WORKS
   ============================================ */

.how-it-works {
  background: linear-gradient(135deg, var(--success-50) 0%, white 100%);
  border-left: 4px solid var(--success-500);
}

.how-it-works .steps {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

@media (min-width: 768px) {
  .how-it-works .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.how-it-works .step {
  padding: var(--space-6);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: relative;
}

.how-it-works .step h3 {
  margin: 0 0 var(--space-3) 0;
  color: var(--success-700);
  font-size: var(--text-lg);
  font-weight: 600;
}

.how-it-works .step p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ============================================
   FORM SECTION
   ============================================ */

.form-section {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: white;
  border: none;
}

.form-section h2 {
  color: white;
}

.form-section h2::after {
  background: linear-gradient(90deg, var(--gold-500) 0%, var(--gold-400) 100%);
}

.form-section > p {
  color: var(--gray-300);
  margin-bottom: var(--space-2);
}

/* Form Styles */
form {
  max-width: 440px;
  margin: var(--space-8) auto 0;
  padding: var(--space-8);
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

form > div {
  margin-bottom: var(--space-5);
}

form > div:last-of-type {
  margin-bottom: 0;
}

form label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  color: var(--gray-800);
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  font-size: var(--text-base);
  color: var(--gray-900);
  transition: all 150ms ease;
  font-family: inherit;
}

form input[type="text"]:hover,
form input[type="email"]:hover,
form input[type="tel"]:hover,
form select:hover {
  border-color: var(--gray-400);
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="tel"]:focus,
form select:focus {
  border-color: var(--primary-500);
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  background: white;
}

form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-12);
  cursor: pointer;
}

form input::placeholder {
  color: var(--gray-400);
}

/* Form Disclaimer */
form p {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: var(--space-4);
  line-height: 1.5;
}

/* Submit Button */
form button[type="submit"],
button {
  width: 100%;
  padding: var(--space-4) var(--space-8);
  background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
  color: white;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 150ms ease;
  box-shadow: var(--shadow-md);
  margin-top: var(--space-2);
}

form button[type="submit"]:hover,
button:hover {
  background: linear-gradient(135deg, var(--success-600) 0%, var(--success-700) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

form button[type="submit"]:active,
button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

form button[type="submit"]:focus-visible,
button:focus-visible {
  outline: 2px solid var(--success-500);
  outline-offset: 2px;
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faq-section {
  background-color: white;
}

.faq-item {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--gray-200);
}

.faq-item:first-of-type {
  padding-top: 0;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-item h3 {
  margin: 0 0 var(--space-3) 0;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--navy-900);
}

.faq-item p {
  margin: 0;
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: var(--space-8) var(--space-6) var(--space-12);
  text-align: center;
  border-top: 1px solid var(--gray-200);
  background: white;
}

footer p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--gray-500);
}

footer p:first-child {
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

footer a {
  color: var(--gold-600);
}

footer a:hover {
  color: var(--gold-500);
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 640px) {
  header {
    padding: var(--space-10) var(--space-4) var(--space-8);
  }
  
  header h1 {
    font-size: var(--text-2xl);
  }
  
  header p {
    font-size: var(--text-base);
  }
  
  main {
    padding: var(--space-6) var(--space-4) var(--space-12);
  }
  
  section {
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    border-radius: var(--radius-lg);
  }
  
  section h2 {
    font-size: var(--text-xl);
  }
  
  form {
    padding: var(--space-6);
    margin-top: var(--space-6);
  }
  
  .how-it-works .step {
    padding: var(--space-4);
  }
  
  .how-it-works .step h3 {
    font-size: var(--text-base);
  }
}

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

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

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Reduce motion for users who prefer it */
@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;
  }
}
