/* ==========================================================================
   AnnieMac Home Mortgage · Cash 2 Keys (C2K) Realtor Portal Stylesheet
   Design System: Clean Light Corporate Aesthetic (Official AnnieMac Palette)
   Typography: Inter, Geist Mono, Fraunces Serif & Permanent Marker Crayon
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Fraunces:ital,opsz,wght@0,9..144,600;0,9..144,800;1,9..144,600&family=Inter:wght@300;400;500;600;700;800&family=Geist+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Official AnnieMac Color Palette */
  --anniemac-navy: #0A2540;
  --anniemac-navy-dark: #07192C;
  --anniemac-navy-light: #133B68;
  --anniemac-blue: #1D4ED8;
  --anniemac-blue-light: #2563EB;
  --anniemac-blue-faint: #EFF6FF;

  --anniemac-gold: #D97706;
  --anniemac-gold-light: #F59E0B;
  --anniemac-gold-faint: #FEF3C7;

  --anniemac-green: #059669;
  --anniemac-green-light: #10B981;
  --anniemac-green-faint: #ECFDF5;

  --anniemac-crayon: #EE6C2B;
  --anniemac-crayon-yellow: #F59E0B;

  --anniemac-red: #DC2626;
  --anniemac-red-faint: #FEF2F2;

  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-subtle: #F1F5F9;
  --border: #E2E8F0;
  --border-hover: #CBD5E1;

  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-faint: #94A3B8;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.font-crayon {
  font-family: 'Permanent Marker', 'Comic Sans MS', cursive;
}

.font-corp {
  font-family: 'Fraunces', Georgia, serif;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Cards & Surface Styling */
.clean-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.clean-card:hover {
  border-color: #94A3B8;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
}

.clean-nav {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* Badges */
.badge-navy {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.badge-gold {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.badge-green {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.badge-red {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.badge-purple {
  background: #FAF5FF;
  color: #7E22CE;
  border: 1px solid #E9D5FF;
}

.badge-crayon {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FFEDD5;
}

/* Range Inputs */
input[type="range"] {
  accent-color: #1D4ED8;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.2s ease-out forwards;
}

/* Pulse Beacon */
.beacon-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
}
.beacon-dot::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #10B981;
  animation: beaconPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes beaconPing {
  0% { transform: scale(0.8); opacity: 0.8; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

/* High-Contrast Step Indicators */
.step-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background-color: #0A2540;
  color: #FFFFFF;
  font-family: 'Geist Mono', monospace;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 2px 4px rgba(10, 37, 64, 0.2);
}

.step-card {
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.step-card:focus-within, .step-card.active {
  border-color: #1D4ED8;
  box-shadow: 0 4px 20px -2px rgba(29, 78, 216, 0.12);
}

/* High Contrast Competitive Matrix */
.matrix-card {
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
}

.matrix-hero-col {
  background: linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 100%);
  border-left: 2px solid #10B981;
  border-right: 2px solid #10B981;
}

/* App Store Download Badges */
.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: #000000;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 14px;
  transition: transform 0.15s, background-color 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}
.app-store-badge:hover {
  background-color: #1F2937;
  transform: translateY(-1px);
}

/* Modal and Drawer Transitions */
.modal-backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Live Proposal Text Message Simulation Box */
.sms-bubble {
  position: relative;
  background: #E9E9EB;
  border-radius: 18px;
  padding: 14px 18px;
  color: #000000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.sms-bubble::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -8px;
  width: 14px;
  height: 16px;
  background: #E9E9EB;
  border-bottom-right-radius: 12px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* 3D Flip Card System for Strategy Cards (Flashcards) */
.flip-card-container {
  perspective: 1400px;
}

.flip-card-wrapper {
  position: relative;
  width: 100%;
  min-height: 480px;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

.flip-card-wrapper.is-flipped {
  transform: rotateY(180deg);
}

.flip-card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.flip-card-face-front {
  z-index: 2;
  transform: rotateY(0deg);
}

.flip-card-face-back {
  transform: rotateY(180deg);
  z-index: 1;
}

/* Print Optimization for Scenario Dossier (Clean 1-Page PDF) */
@media print {
  @page {
    size: letter portrait;
    margin: 0.5in;
  }
  body {
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-size: 11pt !important;
  }
  .no-print, header, footer, nav, button, #header-navigation, #nav-auth-container, .input-panel {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .print-dossier {
    box-shadow: none !important;
    border: 2px solid #0A2540 !important;
    margin: 0 !important;
    width: 100% !important;
    page-break-inside: avoid !important;
  }
  main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
}
