/* FairClaim Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy: #1B2B4B;
  --navy-light: #253a63;
  --gold: #F4A623;
  --gold-dark: #d4891a;
  --green: #22C55E;
  --red: #EF4444;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ── Navigation ── */
nav {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

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

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--white); }

.nav-links {
  display: none;
  gap: 24px;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); text-decoration: none; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--gold-dark); text-decoration: none; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}
.btn-secondary:hover { border-color: var(--white); background: rgba(255,255,255,0.1); text-decoration: none; }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  border: 2px solid var(--navy);
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}
.btn-outline:hover { background: var(--navy); color: var(--white); text-decoration: none; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid var(--gray-100);
}

.card-lg { padding: 32px; }

/* ── Hero ── */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.hero-stat { text-align: center; }
.hero-stat .stat-value { font-size: 1.75rem; font-weight: 700; color: var(--gold); }
.hero-stat .stat-label { font-size: 0.85rem; opacity: 0.8; margin-top: 4px; }

/* ── Sections ── */
section { padding: 64px 0; }
section.alt { background: var(--gray-50); }
section.dark { background: var(--navy); color: var(--white); }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

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

.dark .section-title { color: var(--white); }
.dark .section-subtitle { color: rgba(255,255,255,0.7); }

/* ── Grid ── */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (min-width: 768px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(244,166,35,0.15);
}

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

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-green { background: rgba(34,197,94,0.1); color: #15803d; }
.badge-gold { background: rgba(244,166,35,0.1); color: #b45309; }
.badge-navy { background: rgba(27,43,75,0.1); color: var(--navy); }

/* ── Comp Cards ── */
.comp-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.comp-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.comp-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 4px;
}

.comp-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.comp-details {
  font-size: 0.85rem;
  color: var(--gray-500);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.comp-vin {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-family: monospace;
  margin-top: 8px;
}

/* ── Gap Indicator ── */
.gap-indicator {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin: 24px 0;
}

.gap-amount {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.gap-label { font-size: 0.9rem; opacity: 0.8; margin-top: 8px; }

/* ── Stats Dark ── */
.stat-card-dark {
  text-align: center;
  padding: 24px;
}
.stat-card-dark .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
}
.stat-card-dark .stat-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
}

/* ── Testimonial ── */
.testimonial {
  border-left: 4px solid var(--gold);
  padding: 20px 24px;
  background: var(--gray-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--gray-700);
  margin: 32px 0;
}
.testimonial-author {
  font-style: normal;
  font-weight: 600;
  color: var(--gray-800);
  margin-top: 12px;
  font-size: 0.9rem;
}

/* ── Steps ── */
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-content h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.step-content p { color: var(--gray-500); font-size: 0.9rem; }

/* ── Loading Spinner ── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  text-align: center;
  padding: 48px;
  color: var(--gray-500);
}
.loading-state p { margin-top: 16px; }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.footer-brand .nav-logo { font-size: 1.4rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }

.footer-col h4 { color: var(--white); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(255,255,255,0.65); font-size: 0.9rem; margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.85rem;
  text-align: center;
}

/* ── Gap Bar ── */
.gap-bar-container { margin: 24px 0; }
.gap-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.gap-bar-track {
  height: 12px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.gap-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.6s ease;
}

/* ── Metric Cards ── */
.metric-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}
.metric-label { font-size: 0.8rem; color: var(--gray-500); font-weight: 500; margin-bottom: 4px; }
.metric-value { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); }
.metric-value.positive { color: var(--green); }
.metric-value.negative { color: var(--red); }
.metric-value.gold { color: var(--gold-dark); }

/* ── Letter Preview ── */
.letter-preview {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  line-height: 1.8;
  white-space: pre-wrap;
  min-height: 400px;
  color: var(--gray-800);
}

.letter-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ── Alert / Notice ── */
.notice {
  background: rgba(244,166,35,0.08);
  border: 1px solid rgba(244,166,35,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.disclaimer {
  font-size: 0.8rem;
  color: var(--gray-400);
  font-style: italic;
  margin-top: 12px;
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-gold { color: var(--gold-dark); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-navy { color: var(--navy); }
.text-muted { color: var(--gray-500); }

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.hidden { display: none !important; }

/* ── Print Styles ── */
@media print {
  nav, footer, .letter-actions, .btn-primary, .btn-outline { display: none !important; }
  .letter-preview { border: none; padding: 0; font-size: 11pt; }
  body { color: #000; }
}
