/* ============================================================
   COLOR PALETTE & TYPOGRAPHY
   ============================================================ */
:root {
  --navy-50: #f0f3f9;
  --navy-100: #d9e0ef;
  --navy-200: #b3c1df;
  --navy-300: #8da2cf;
  --navy-400: #6783bf;
  --navy-500: #1a3a6b;
  --navy-600: #152e56;
  --navy-700: #102340;
  --navy-800: #0b172b;
  --navy-900: #060c15;

  --gold-50: #fdf8f0;
  --gold-100: #f9edd6;
  --gold-200: #f3dbad;
  --gold-300: #edc984;
  --gold-400: #e7b75b;
  --gold-500: #c9993a;
  --gold-600: #a17a2e;
  --gold-700: #795c23;
  --gold-800: #513d17;
  --gold-900: #281f0c;

  --charcoal-50: #f5f5f5;
  --charcoal-100: #e5e5e5;
  --charcoal-200: #cccccc;
  --charcoal-300: #b3b3b3;
  --charcoal-400: #999999;
  --charcoal-500: #4a4a4a;
  --charcoal-600: #3b3b3b;
  --charcoal-700: #2d2d2d;
  --charcoal-800: #1e1e1e;
  --charcoal-900: #0f0f0f;
}

/* ============================================================
   GLOBAL STYLES
   ============================================================ */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--charcoal-700);
  background: #ffffff;
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.6;
  font-size: 15px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* ============================================================
   BUTTON STYLES
   ============================================================ */
button, .btn {
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  display: inline-block;
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, #c9993a 0%, #e7b75b 50%, #c9993a 100%);
  color: #0b172b;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #e7b75b 0%, #c9993a 50%, #e7b75b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(201, 153, 58, 0.4);
}

.btn-navy {
  background: #1a3a6b;
  color: white;
}

.btn-navy:hover {
  background: #152e56;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(26, 58, 107, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid #1a3a6b;
  color: #1a3a6b;
}

.btn-secondary:hover {
  background: #f0f3f9;
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-input, .form-select, textarea {
  background: white;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  outline: none;
  font-family: inherit;
}

.form-input:focus, .form-select:focus {
  border-color: #1a3a6b;
  box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.1);
}

.form-select {
  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='%234a4a4a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal-600);
  margin-bottom: 8px;
}

.required::after {
  content: '*';
  color: #dc2626;
  margin-left: 4px;
}

/* ============================================================
   CONDITION BUTTON SELECTOR
   ============================================================ */
.condition-btn {
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  text-align: center;
  font-weight: 500;
}

.condition-btn:hover {
  border-color: #1a3a6b;
}

.condition-btn.active {
  border-color: #1a3a6b;
  background: #f0f3f9;
  color: #1a3a6b;
  font-weight: 600;
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */
.toggle-btn {
  width: 48px;
  height: 26px;
  border-radius: 13px;
  background: #cccccc;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
  border: none;
  display: inline-block;
}

.toggle-btn.active {
  background: #1a3a6b;
}

.toggle-btn::after {
  content: '';
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-btn.active::after {
  transform: translateX(22px);
}

/* ============================================================
   PROGRESS INDICATORS
   ============================================================ */
.progress-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: #e5e5e5;
  color: #999999;
}

.progress-step.active {
  background: #c9993a;
  color: #0b172b;
}

.progress-step.completed {
  background: #1a3a6b;
  color: white;
}

.progress-line {
  height: 2px;
  flex: 1;
  transition: background 0.3s ease;
  background: #e5e5e5;
}

.progress-line.completed {
  background: #1a3a6b;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

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

.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

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

.scale-in {
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================================
   LAYOUT & CONTAINERS
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-section {
  background: linear-gradient(135deg, #0b172b 0%, #1a3a6b 50%, #102340 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 1.8rem;
  }
}

/* ============================================================
   FORM LAYOUT
   ============================================================ */
.form-grid {
  display: grid;
  gap: 20px;
}

.form-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
  .form-grid.two-col {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

/* ============================================================
   MODAL & OVERLAY
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 43, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeOverlay 0.2s ease-out;
}

@keyframes fadeOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-panel {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.3s ease-out;
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999999;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #1a3a6b;
}

.hidden {
  display: none !important;
}

/* ============================================================
   RESULTS DISPLAY
   ============================================================ */
.result-value-box {
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.result-value-box h3 {
  color: #1a3a6b;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.result-bar {
  background: linear-gradient(90deg, #1a3a6b 0%, #c9993a 100%);
  height: 8px;
  border-radius: 4px;
  margin: 16px 0;
}

.price-range {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 12px 0;
}

.price-point {
  text-align: center;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.price-point-label {
  font-size: 12px;
  color: #999999;
  margin-bottom: 4px;
}

.price-point-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a3a6b;
}

/* ============================================================
   TABLE STYLES
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

thead {
  background: #f5f5f5;
  border-bottom: 2px solid #e5e5e5;
}

th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #1a3a6b;
  font-size: 13px;
}

td {
  padding: 12px;
  border-bottom: 1px solid #e5e5e5;
  font-size: 14px;
}

tbody tr:hover {
  background: #f9f9f9;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: box-shadow 0.3s ease;
}

.card-header {
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a3a6b;
}

/* ============================================================
   ALERTS & BANNERS
   ============================================================ */
.alert {
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  color: #065f46;
}

.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

/* ============================================================
   TEXT UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-navy { color: #1a3a6b; }
.text-gold { color: #c9993a; }
.text-charcoal { color: #4a4a4a; }
.text-muted { color: #999999; }

.text-sm { font-size: 13px; }
.text-lg { font-size: 17px; }
.text-xl { font-size: 20px; }

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

/* ============================================================
   SPACING UTILITIES
   ============================================================ */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

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

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 640px) {
  body { font-size: 14px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }

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

  .price-range {
    grid-template-columns: 1fr;
  }

  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 641px) {
  .hidden-desktop {
    display: none !important;
  }
}

/* ============================================================
   LOADING STATE
   ============================================================ */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

.spinner {
  border: 2px solid #e5e5e5;
  border-top-color: #1a3a6b;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   UTILITY: GOLD ACCENT
   ============================================================ */
.gold-accent { color: #c9993a; }
.gold-border { border-color: #c9993a; }

/* ============================================================
   BREADCRUMBS & NAVIGATION
   ============================================================ */
.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: #999999;
  margin: 16px 0;
}

.breadcrumb a {
  color: #1a3a6b;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .separator {
  color: #cccccc;
}

/* ============================================================
   STEP SECTIONS (for form wizard)
   ============================================================ */
.step-section {
  display: none;
}

.step-section.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.success-checkmark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #d1fae5;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #065f46;
  font-size: 32px;
}

/* Mobile-specific fixes are in index.html <style> block
   (must come after utility class definitions for proper cascade) */
