
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Removed smooth scroll for better mobile performance - use JavaScript for controlled smooth scrolling when needed */

/* Accessible focus ring defaults */
:focus-visible {
  outline: 2px solid #D4AF37; /* Gold-400 */
  outline-offset: 2px;
}

/* Reusable high-contrast text helpers for WCAG AA in light contexts */
.text-aa-body {
  color: #374151;
}

.text-aa-accent {
  color: #8A6A12;
}

/* Animation Utility Classes */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, visibility;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
}

.fade-in-left {
  transform: translateX(-30px);
}

.fade-in-left.is-visible {
  transform: translateX(0);
}

/* Hero section enhancements */
.hero-gradient-overlay {
  background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 100%);
}

/* Custom animation for scroll indicator */
@keyframes bounce-slow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(5px);
  }
  60% {
    transform: translateY(3px);
  }
}

.animate-bounce-slow {
  animation: bounce-slow 2s infinite;
}

/* Float-in animation for transformation image */
@keyframes float-in {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
  80% {
    transform: translateY(3px) scale(1);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.animate-float-in {
  animation: float-in 1.2s ease-out forwards;
}

/* Enhanced Navbar Styles */
.navbar-logo-container {
  display: flex;
  align-items: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.navbar-logo-picture {
  display: inline-flex;
  align-items: center;
}

.navbar-logo {
  height: 40px;
  width: auto;
  max-width: 160px;
  transition: all 0.3s ease;
  object-fit: contain;
  display: block;
}

.navbar-logo.logo-solid {
  filter: brightness(0) saturate(100%) invert(0%);
}

.navbar-logo.logo-transparent {
  filter: brightness(0) saturate(100%) invert(100%);
}

.navbar-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

nav[aria-label="Main navigation"] .navbar-brand {
  min-width: 0;
  max-width: min(50vw, 18rem);
}

nav[aria-label="Main navigation"] .navbar-name,
nav[aria-label="Main navigation"] .navbar-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar-name {
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: 1.5rem;
}

.navbar-subtitle {
  font-weight: 300;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  margin-top: -2px;
  opacity: 0.85;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .navbar-logo-container {
    margin-right: 12px;
  }

  nav[aria-label="Main navigation"] .navbar-brand {
    max-width: min(56vw, 15rem);
  }
  
  .navbar-logo {
    height: 36px;
    max-width: 144px;
  }
  
  .navbar-brand {
    line-height: 1.1;
  }
  
  .navbar-name {
    font-size: 1.25rem;
  }
  
  .navbar-subtitle {
    font-size: 0.75rem;
    margin-top: -1px;
    letter-spacing: 0.03em;
  }
}

@media (max-width: 480px) {
  .navbar-logo-container {
    margin-right: 10px;
  }

  nav[aria-label="Main navigation"] .navbar-brand {
    max-width: min(60vw, 13rem);
  }
  
  .navbar-logo {
    height: 32px;
    max-width: 128px;
  }
  
  .navbar-name {
    font-size: 1.1rem;
  }
  
  .navbar-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.02em;
  }
}

@media (max-width: 360px) {
  .navbar-logo {
    height: 28px;
    max-width: 112px;
  }
  
  .navbar-logo-container {
    margin-right: 8px;
  }
  
  .navbar-name {
    font-size: 1rem;
  }
  
  .navbar-subtitle {
    font-size: 0.65rem;
  }
}

/* Footer logo styles */
.footer-logo-container {
  display: flex;
  align-items: center;
  margin-right: 16px;
}

.footer-logo {
  height: 48px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
  transition: all 0.3s ease;
  display: block;
}

/* Footer subtitle responsive styles */
@media (max-width: 768px) {
  .footer-subtitle {
    font-size: 0.8rem;
  }
  
  .footer-logo {
    height: 40px;
    max-width: 48px;
  }
  
  .footer-logo-container {
    margin-right: 14px;
  }
}

@media (max-width: 480px) {
  .footer-subtitle {
    font-size: 0.75rem;
  }
  
  .footer-logo {
    height: 36px;
    max-width: 44px;
  }
  
  .footer-logo-container {
    margin-right: 12px;
  }
}

/* Additional responsive adjustments for footer alignment */
@media (max-width: 640px) {
  .footer-logo-container {
    margin-right: 10px;
  }
  
  .footer-logo {
    height: 32px;
    max-width: 40px;
  }
  
  .footer-subtitle {
    font-size: 0.7rem;
    margin-top: 0.5px;
  }
}

/* Masonry Grid Layout for Gallery */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: auto;
  gap: 1.5rem;
  grid-auto-flow: dense;
}

.masonry-item {
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.masonry-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Fade in animation for gallery items */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments for masonry grid */
@media (max-width: 768px) {
  .masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .masonry-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* Enhanced image loading animation */
.masonry-item img {
  transition: transform 0.5s ease, filter 0.3s ease;
}

.masonry-item:hover img {
  filter: brightness(1.05);
}

/* Category filter button enhancements */
.category-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.category-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.3); /* Gold with opacity */
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.category-button:hover::before {
  width: 300px;
  height: 300px;
}

/* Lightbox enhancements */
.lightbox-overlay {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox-image {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Image Loading Optimization */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Content Visibility for Images */
img[loading="lazy"] {
  content-visibility: auto;
}

img[loading="eager"] {
  content-visibility: visible;
}

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

/* Image Aspect Ratio Preservation */
img {
  aspect-ratio: auto;
}
