/* IronHead Concrete custom styles */

/* Import Google Fonts - Playfair Display for headers */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

@import "tailwindcss";

/* Local font declarations for Grown */
@font-face {
  font-family: 'Grown';
  src: url('../fonts/Grown.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Local font declarations for Glacial Indifference */
@font-face {
  font-family: 'Glacial Indifference';
  src: url('../fonts/GlacialIndifference-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Glacial Indifference';
  src: url('../fonts/GlacialIndifference-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Glacial Indifference';
  src: url('../fonts/GlacialIndifference-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Base styles */
body {
  font-family: 'Glacial Indifference', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #000000; /* Primary black color for body text */
}

/* Typography - Headers use Grown, Body uses Glacial Indifference */
.font-heading {
  font-family: 'Grown', serif;
  letter-spacing: 0.1em;
}

.font-body {
  font-family: 'Glacial Indifference', sans-serif;
}

.font-display {
  font-family: 'Grown', serif;
  letter-spacing: 0.1em;
}

.font-sans {
  font-family: 'Glacial Indifference', sans-serif;
}

.font-serif {
  font-family: 'Grown', serif;
  letter-spacing: 0.1em;
}

/* Ensure all headings use Grown font with letter spacing */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Grown', serif;
  letter-spacing: 0.1em;
}

/* Color utility classes with hardcoded values */
.text-primary {
  color: #0F72B2;
}

.bg-primary {
  background-color: #0F72B2;
}

.border-primary {
  border-color: #0F72B2;
}

.bg-light {
  background-color: #F6F6F6;
}

.bg-beige {
  background-color: #EAE6E3;
}

.text-mid-gray {
  color: #757575;
}

.text-black {
  color: #000000;
}

.bg-black {
  background-color: #000000;
}

.border-light {
  border-color: #F6F6F6;
}

.border-beige {
  border-color: #EAE6E3;
}

.border-mid-gray {
  border-color: #757575;
}

.text-light {
  color: #F6F6F6;
}

.text-white {
  color: #ffffff;
}

.bg-white {
  background-color: #ffffff;
}

/* Generic Tailwind color mappings to custom palette */
.text-gray-900 {
  color: #000000; /* Map to black */
}

.text-gray-600 {
  color: #757575; /* Map to mid-gray */
}

.text-gray-500 {
  color: #757575; /* Map to mid-gray */
}

.text-gray-400 {
  color: #757575; /* Map to mid-gray */
}

.text-gray-300 {
  color: #757575; /* Map to mid-gray */
}

.bg-gray-900 {
  background-color: #000000; /* Map to black */
}

.bg-gray-800 {
  background-color: #000000; /* Map to black */
}

.bg-gray-50 {
  background-color: #EAE6E3; /* Map to beige */
}

.bg-gray-100 {
  background-color: #F6F6F6; /* Map to light */
}

.border-gray-100 {
  border-color: #F6F6F6; /* Map to light */
}

.border-gray-800 {
  border-color: #000000; /* Map to black */
}

.from-gray-50 {
  --tw-gradient-from: #EAE6E3;
  --tw-gradient-to: rgb(234 230 227 / 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.from-beige {
  --tw-gradient-from: #EAE6E3;
  --tw-gradient-to: rgb(234 230 227 / 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-light {
  --tw-gradient-to: #F6F6F6;
}

.to-white {
  --tw-gradient-to: #ffffff;
}

/* Primary color with opacity */
.bg-primary\/10 {
  background-color: rgba(15, 114, 178, 0.1);
}

.bg-primary\/20 {
  background-color: rgba(15, 114, 178, 0.2);
}

/* White with opacity */
.bg-white\/95 {
  background-color: rgba(255, 255, 255, 0.95);
}

/* Button styles - Use Glacial Indifference for buttons */
.btn-primary {
  background-color: #0F72B2;
  color: #F6F6F6;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-family: 'Glacial Indifference', sans-serif;
  text-decoration: none;
  display: inline-block;
  /* Optimize transitions - only animate specific properties */
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #0a5a8a; /* Darker shade of primary */
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 114, 178, 0.3);
}

/* Filter button styles - Use Glacial Indifference for buttons */
.filter-btn {
  background-color: #F6F6F6;
  color: #757575;
  border: 1px solid #EAE6E3;
  font-family: 'Glacial Indifference', sans-serif;
  /* Optimize transitions - only animate specific properties */
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover {
  background-color: #EAE6E3;
  color: #000000;
}

.filter-btn.active {
  background-color: #0F72B2;
  color: #F6F6F6;
  border-color: #0F72B2;
}

/* Gallery styles - Optimized for performance */
.gallery-item {
  /* Only animate opacity and transform for better performance */
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.gallery-item img {
  /* Use transform3d for hardware acceleration */
  transition: transform 0.3s ease;
  transform: translateZ(0);
}

.gallery-item:hover img {
  transform: scale(1.05) translateZ(0);
}

/* Form styles */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #0F72B2;
  box-shadow: 0 0 0 3px rgba(15, 114, 178, 0.1);
}

/* Mobile menu backdrop - Optimized for performance */
@media (max-width: 768px) {
  .backdrop-blur-md {
    /* Use a lighter blur for better performance on mobile */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* Add fallback background for devices that don't support backdrop-filter */
    background-color: rgba(255, 255, 255, 0.9);
  }
  
  /* Disable backdrop blur on older/slower devices */
  @supports not (backdrop-filter: blur(8px)) {
    .backdrop-blur-md {
      background-color: rgba(255, 255, 255, 0.95);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
  }
}

/* Smooth scrolling with performance optimization */
html {
  scroll-behavior: smooth;
}

/* Performance optimizations */
* {
  /* Use hardware acceleration for transforms and opacity changes */
  will-change: auto;
}

/* Reduce layout shifts */
img {
  /* Prevent layout shifts during image loading */
  height: auto;
  max-width: 100%;
}

/* Optimize animations to use only transform and opacity */
.gallery-item,
.btn-primary,
.btn-secondary,
.group {
  /* Force hardware acceleration for smooth animations */
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Optimize font rendering */
body {
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Loading animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

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

::-webkit-scrollbar-track {
  background: #F6F6F6;
}

::-webkit-scrollbar-thumb {
  background: #757575;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0F72B2;
}

footer {
  color: #757575; /* Mid-grey color for footer text */
}

.btn-secondary {
  /* Optimize transitions - only animate specific properties */
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 114, 178, 0.3);
}