/* === TRIBUTE DESIGN SYSTEM v2.0 === */
/* Supplements Tailwind + inline styles in _Layout.cshtml */
/* See docs/DESIGN_GUIDELINES.md for full spec */

/* ─── CSS Custom Properties ─── */
:root {
  /* Primary */
  --c-navy: #05081F;
  --c-blue: #0B1BFF;
  --c-mid-blue: #07107A;
  --c-accent-blue: #7B93FF;
  --c-teal: #0EA5E9;

  /* Light / Neutral */
  --c-light-blue: #E8EDFF;
  --c-ice-blue: #F0F4FF;
  --c-teal-light: #E0F2FE;
  --c-gray-50: #F8F9FB;
  --c-gray-200: #E2E8F0;
  --c-gray-400: #94A3B8;
  --c-gray-600: #475569;
  --c-gray-800: #1E293B;
  --c-white: #FFFFFF;

  /* Semantic */
  --c-success: #059669;
  --c-success-light: #D1FAE5;
  --c-warning: #D97706;
  --c-warning-light: #FEF3C7;
  --c-danger: #DC2626;
  --c-danger-light: #FEE2E2;

  /* Z-Index Scale */
  --z-base: 0;
  --z-raised: 10;
  --z-sticky: 20;
  --z-dropdown: 30;
  --z-overlay: 40;
  --z-nav: 50;
  --z-modal: 60;
  --z-toast: 70;
  --z-fixed: 50;
}

/* ─── Smooth Scroll ─── */
html { scroll-behavior: smooth; }

/* ─── Button Components ─── */

/* Primary Button */
.btn-primary {
  background: var(--c-blue);
  color: #fff;
  font: 600 15px/1 'Inter', sans-serif;
  padding: 12px 24px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
  position: relative;
}
.btn-primary:hover { background: #0918E8; transform: scale(1.02); }
.btn-primary:focus-visible {
  outline: 2px solid var(--c-accent-blue);
  outline-offset: 3px;
}
/* Disabled state */
.btn-primary:disabled,
.btn-primary[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}
/* Loading state */
.btn-primary.is-loading {
  pointer-events: none;
  opacity: 0.8;
}
.btn-primary.is-loading .btn-label { visibility: hidden; }
.btn-primary.is-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

/* Button spinner animation */
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Secondary Button (Outline) */
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--c-blue);
  color: var(--c-blue);
  font: 600 15px/1 'Inter', sans-serif;
  padding: 12px 24px;
  border-radius: 9999px;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--c-light-blue); }
.btn-secondary:focus-visible { outline: 2px solid var(--c-accent-blue); outline-offset: 3px; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Ghost Button (On Dark Backgrounds) */
.btn-ghost {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font: 600 15px/1 'Inter', sans-serif;
  padding: 12px 24px;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.3); }
.btn-ghost:focus-visible { outline: 2px solid rgba(255,255,255,0.8); outline-offset: 3px; }
/* Fallback for no backdrop-filter support */
@supports not (backdrop-filter: blur(8px)) {
  .btn-ghost { background: rgba(255, 255, 255, 0.25); }
}

/* Teal CTA Button — R&D Screener Only */
.btn-teal {
  background: var(--c-teal);
  color: #fff;
  font: 600 15px/1 'Inter', sans-serif;
  padding: 12px 24px;
  border-radius: 9999px;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
}
.btn-teal:hover { background: #0284C7; transform: scale(1.02); }
.btn-teal:focus-visible { outline: 2px solid var(--c-teal); outline-offset: 3px; }
.btn-teal:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Danger Button */
.btn-danger {
  background: var(--c-danger);
  color: #fff;
  font: 600 15px/1 'Inter', sans-serif;
  padding: 12px 24px;
  border-radius: 9999px;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
}
.btn-danger:hover { background: #b91c1c; transform: scale(1.02); }

/* Mobile Bottom Nav — body/footer padding on mobile */
@media (max-width: 1023px) {
  body { padding-bottom: 72px; }
  footer { padding-bottom: 72px; }
}

/* ─── Card Components ─── */

/* Service Card (Light) */
.card-service {
  background: var(--c-white);
  border: 1px solid var(--c-gray-200);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s ease;
}
.card-service:hover {
  box-shadow: 0 10px 40px rgba(11, 27, 255, 0.08);
  border-color: var(--c-blue);
  transform: translateY(-2px);
}

/* Dark Gradient Card */
.card-dark {
  background: linear-gradient(135deg, #05081F 0%, #07107A 50%, #030510 100%);
  border-radius: 16px;
  padding: 40px;
  color: var(--c-white);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* Highlight Card (Callout) */
.card-highlight {
  background: var(--c-light-blue);
  border-left: 4px solid var(--c-blue);
  border-radius: 0;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 24px;
}

/* ─── Screener Result Cards ─── */

/* Strong Preliminary Potential — uses teal */
.card-result--strong {
  background: var(--c-teal-light);
  border: 2px solid var(--c-teal);
  border-radius: 16px;
  padding: 32px;
}
.card-result--strong .result-band-label { color: #0369A1; }
.card-result--strong .result-score { color: #0284C7; }

/* Good Candidate / Possible — warning */
.card-result--possible {
  background: var(--c-warning-light);
  border: 2px solid var(--c-warning);
  border-radius: 16px;
  padding: 32px;
}
.card-result--possible .result-band-label { color: #92400E; }
.card-result--possible .result-score { color: #D97706; }

/* Limited Preliminary Potential — danger */
.card-result--limited {
  background: var(--c-danger-light);
  border: 2px solid var(--c-danger);
  border-radius: 16px;
  padding: 32px;
}
.card-result--limited .result-band-label { color: #991B1B; }
.card-result--limited .result-score { color: #DC2626; }

/* ─── Score Preview Card (Blurred — Pre-Gate) ─── */
.card-result--preview {
  background: var(--c-ice-blue);
  border: 1px solid var(--c-gray-200);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.card-result--preview .result-content {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
}
.card-result--preview .preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(240, 244, 255, 0.7);
}
.card-result--preview .preview-overlay p {
  font: 600 16px/1.5 'Inter', sans-serif;
  color: var(--c-navy);
  text-align: center;
  max-width: 280px;
}

/* ─── Score Display & Dollar Estimate Typography ─── */
.score-display {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: clamp(3rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.dollar-estimate {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--c-gray-800);
}

/* ─── Screener Step Transitions ─── */
.screener-question {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.screener-question.is-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  height: 0;
  overflow: hidden;
}
.screener-question.is-active {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Screener Progress Bar ─── */
.screener-progress-track {
  height: 4px;
  background: var(--c-gray-200);
  border-radius: 2px;
  overflow: hidden;
}
.screener-progress-fill {
  height: 100%;
  background: var(--c-teal);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Screener Option Button ─── */
.screener-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--c-gray-200);
  border-radius: 0.75rem;
  background: white;
  color: var(--c-gray-800);
  font-size: 0.938rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.screener-option:hover {
  border-color: var(--c-teal);
  background: var(--c-teal-light);
  transform: translateX(4px);
}
.screener-option:focus-visible {
  outline: 2px solid var(--c-teal);
  outline-offset: 2px;
}

/* ─── Form States ─── */
.form-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font: 500 13px/1.4 'Inter', sans-serif;
  color: var(--c-danger);
}

.form-success {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font: 500 13px/1.4 'Inter', sans-serif;
  color: var(--c-success);
}

.form-field--error {
  border-color: var(--c-danger);
  background: #FFF8F8;
}
.form-field--error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* ─── Loading / Skeleton States ─── */
.skeleton {
  background: linear-gradient(90deg, #E2E8F0 25%, #F0F4FF 50%, #E2E8F0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Badge Pulse ─── */
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.badge-pulse { animation: pulse-badge 2s ease-in-out infinite; }

/* ─── Print Styles ─── */
@media print {
  .site-navbar, footer { display: none !important; }
  main { padding-top: 0 !important; }
}
