/* Confident Interior Custom Brand Palette & Offline CSS Fallbacks */
:root {
  --brand-ivory: #F6F3ED;
  --brand-dark: #181817;
  --brand-graphite: #292825;
  --brand-gold: #9A8063;
  --brand-border: #E5DED3;
}

/* Base Body Typography matching React theme */
html, body {
  font-family: 'Manrope', 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  background-color: var(--brand-ivory);
  color: var(--brand-dark);
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #F6F3ED;
}
::-webkit-scrollbar-thumb {
  background: #E5DED3;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9A8063;
}

/* Custom Colors & Utilities */
.bg-brandIvory { background-color: var(--brand-ivory) !important; }
.bg-brandDark { background-color: var(--brand-dark) !important; }
.bg-brandGraphite { background-color: var(--brand-graphite) !important; }
.bg-brandGold { background-color: var(--brand-gold) !important; }
.bg-brandBorder { background-color: var(--brand-border) !important; }

.text-brandIvory { color: var(--brand-ivory) !important; }
.text-brandDark { color: var(--brand-dark) !important; }
.text-brandGraphite { color: var(--brand-graphite) !important; }
.text-brandGold { color: var(--brand-gold) !important; }
.text-brandBorder { color: var(--brand-border) !important; }

.border-brandIvory { border-color: var(--brand-ivory) !important; }
.border-brandDark { border-color: var(--brand-dark) !important; }
.border-brandGraphite { border-color: var(--brand-graphite) !important; }
.border-brandGold { border-color: var(--brand-gold) !important; }
.border-brandBorder { border-color: var(--brand-border) !important; }

/* Responsive Logo Emblem Styling across all viewports */
.brand-logo-container {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .brand-logo-container {
    width: 42px;
    height: 42px;
  }
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Modern Top Navigation Progress Bar (YouTube/GitHub-style) */
#top-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #9A8063, #CBA16B, #E5DED3);
  z-index: 99999;
  transition: width 0.3s ease, opacity 0.4s ease;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 8px rgba(154, 128, 99, 0.6);
}

#top-progress-bar.loading {
  opacity: 1;
  width: 75%;
  transition: width 0.6s cubic-bezier(0.1, 0.7, 0.1, 1);
}

#top-progress-bar.done {
  width: 100%;
  opacity: 1;
  transition: width 0.2s ease;
}

/* Button Loading Spinner Utility */
.btn-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: btn-spin 0.6s linear infinite;
}

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