/* Custom styles for Brightmind Digital - Anthropic-inspired */

/* CSS Custom Properties for the new color palette */
:root {
  --warm-white: #FEFCF8;
  --warm-beige: #F7F4F0;
  --soft-coral: #E27D60;
  --muted-coral: #C8A882;
  --warm-gray: #8B7F72;
  --dark-gray: #2F2F2F;
  --sage-green: #A8B5A0;
  --cream: #FBF9F4;
}
html {
  scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Apply animations to elements */
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Custom gradient backgrounds */
.gradient-warm {
  background: linear-gradient(135deg, var(--warm-white) 0%, var(--cream) 100%);
}

.gradient-coral {
  background: linear-gradient(135deg, var(--soft-coral) 0%, var(--muted-coral) 100%);
}

/* Enhanced hover effects */
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(139, 69, 19, 0.1);
}

/* Typography enhancements */
.text-balance {
  text-wrap: balance;
}

/* Custom focus styles for accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--soft-coral);
  outline-offset: 2px;
}

/* Remove focus outline for FAQ toggle buttons */
.faq-toggle:focus {
  outline: none;
}

/* Mobile-first responsive typography */
@media (max-width: 640px) {
  h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 2rem;
    line-height: 1.3;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--warm-beige);
}

::-webkit-scrollbar-thumb {
  background: var(--soft-coral);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-coral);
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Blog post styling */
.blog-content {
  line-height: 1.8;
}

.blog-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--dark-gray);
}

.blog-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark-gray);
}

.blog-content p {
  margin-bottom: 1rem;
}

.blog-content ul {
  margin: 1rem 0 1.5rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.blog-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.blog-content blockquote {
  border-left: 4px solid var(--soft-coral);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--dark-gray);
}

.blog-content code {
  background: var(--cream);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875em;
}

.blog-content pre {
  background: var(--cream);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

/* Navigation enhancements */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--soft-coral);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Logo animation styles */
.logo-container {
  position: relative;
  display: inline-block;
  width: auto;
  height: 3rem; /* h-12 = 3rem */
}

.logo-full,
.logo-compact {
  display: block;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), 
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-full {
  opacity: 1;
  transform: translateX(0) scale(1);
  position: relative;
  width: auto;
  height: 3rem;
}

.logo-compact {
  opacity: 0;
  transform: translateX(0) scale(0.95);
  position: absolute;
  top: 0;
  left: 0;
  height: 2.5rem; /* h-10 = 2.5rem */
  width: auto;
  pointer-events: none;
}

/* When scrolled - sophisticated fade transition */
.nav-scrolled .logo-full {
  opacity: 0;
  transform: translateX(0) scale(0.95);
  pointer-events: none;
}

.nav-scrolled .logo-compact {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

/* Remove focus outline from logo when compact version is showing */
.nav-scrolled .logo-container:focus {
  outline: none;
}

/* Button enhancements */
.btn-primary {
  background: linear-gradient(135deg, var(--soft-coral) 0%, var(--muted-coral) 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(226, 125, 96, 0.3);
}

.btn-secondary {
  border: 2px solid var(--dark-gray);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--dark-gray);
  color: var(--warm-white);
  transform: translateY(-2px);
}

/* Form styling */
.form-input {
  border: 2px solid var(--soft-coral);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.3s ease;
  background: var(--cream);
}

.form-input:focus {
  border-color: var(--muted-coral);
  outline: none;
  box-shadow: 0 0 0 3px rgba(226, 125, 96, 0.1);
}

/* Image optimizations */
img {
  height: auto;
  max-width: 100%;
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here in the future */
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Email spam protection - CSS obfuscation layer */
.email-protect {
  unicode-bidi: bidi-override;
  direction: rtl;
}
/* TidyCal Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(47, 47, 47, 0.8);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  background: #2F2F2F;
  border-radius: 16px;
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow: hidden;
  padding: 0;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
}

.modal-close:hover {
  background: #E27D60;
  transform: rotate(90deg);
}

.tidycal-embed {
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  height: 700px;
  min-height: 600px;
}

/* Hide close button on mobile to avoid collision with TidyCal UI */
@media (max-width: 768px) {
  .modal-close {
    display: none;
  }
  
  .modal-content {
    width: 95%;
    max-width: 95vw;
    max-height: 95vh;
    margin: 2.5vh auto;
    border-radius: 12px;
    padding: 16px;
  }
  
  .tidycal-embed {
    border-radius: 8px;
    height: calc(95vh - 32px);
    min-height: 500px;
    max-height: 700px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 98%;
    max-width: 98vw;
    max-height: 98vh;
    margin: 1vh auto;
    border-radius: 8px;
    padding: 12px;
  }
  
  .tidycal-embed {
    border-radius: 6px;
    height: calc(98vh - 24px);
    min-height: 450px;
    max-height: 650px;
  }
}

/* Dark background variant for chat page */
body.dark-bg .modal-overlay {
  background-color: rgba(26, 26, 26, 0.95);
}

body.dark-bg .modal-content {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
