/**
 * Main CSS Styles
 * Contains base styles, scrollbar customization, and global behaviors
 * Updated with new color scheme for 15:1 contrast ratio
 */

/* TYPOGRAPHY SYSTEM */

/* Anton - Brand & Impact (Hero Headlines, Album Titles) */
.font-brand {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
  color: #ffffff;
}

.hero-signature {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-align: center;
  max-width: 90vw;
  margin: 0 auto;
}

/* Oswald - Navigation & UI Headers (Nav, H2, H3, Buttons) */
.font-header {
  font-family: "Oswald", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
}

.font-header-nav {
  font-family: "Oswald", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #a3a3a3;
}

.font-header-section {
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
}

/* Inter - Body & Utility (Paragraphs, Descriptions, Footer) */
.font-body {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  color: #a3a3a3;
  line-height: 1.6;
}

.font-body-light {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  color: #a3a3a3;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .hero-signature {
    font-size: 2.5rem;
    line-height: 1.2;
    max-width: 95vw;
  }

  /* Navbar mobile optimization - increased visibility */
  #main-nav {
    padding-top: 1rem;
    padding-bottom: 1rem;
    min-height: 80px;
  }

  /* Mobile menu text sizing */
  #mobile-menu .flex > div {
    font-size: 1.5rem;
  }

  /* Mobile menu links tap target */
  #mobile-menu a {
    padding: 1rem;
    display: inline-block;
    min-width: 44px;
    min-height: 44px;
  }

  /* Section padding optimization for mobile */
  section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  /* Button tap target minimum */
  button {
    min-height: 44px;
    min-width: 44px;
  }

  /* Reduce hero section padding on mobile */
  section[style*="background-image"] {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  /* Typography scaling for mobile */
  .font-brand {
    letter-spacing: 0.02em;
  }

  .font-header {
    letter-spacing: 0.05em;
  }

  .font-header-section {
    letter-spacing: 0.05em;
  }

  /* Reduce postcard translations on small screens */
  .postcard {
    transform: none !important;
  }

  /* Ensure adequate touch targets for all interactive elements */
  a,
  button {
    min-height: 44px;
  }

  /* Mobile-friendly footer gaps */
  footer {
    gap: 2rem;
  }

  /* Better spacing for cards on mobile */
  .product-card,
  .card {
    margin-bottom: 0.5rem;
  }
}

/* =============================================
   MOBILE MENU — Force overlay styles
   Ignores all parents, media queries, Tailwind
   ============================================= */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: none;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#mobile-menu.active {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 2rem !important;
  background: #000000 !important;
  padding: 2rem !important;
  width: 100vw !important;
  height: 100vh !important;
}

/* Close button at top-right of mobile menu */
#mobile-menu::before {
  content: "✕";
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #ffffff !important;
  font-size: 2rem !important;
  cursor: pointer;
  z-index: 10002 !important;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5) !important;
  border-radius: 50%;
  font-weight: 300;
}

#mobile-menu .mobile-link {
  color: #ffffff !important;
  font-family: "Oswald", sans-serif !important;
  font-size: 1.75rem !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.15em !important;
  text-decoration: none !important;
  text-align: center !important;
  display: inline-block !important;
  padding: 0.75rem 2rem !important;
  min-height: 44px !important;
  opacity: 1 !important;
  transition: color 0.2s ease !important;
  background: none !important;
  border: none !important;
  flex-shrink: 0 !important;
}

#mobile-menu .mobile-link:hover,
#mobile-menu .mobile-link:focus {
  color: #a3a3a3 !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Ensure mobile menu button is visible */
#mobile-menu-btn {
  color: #ffffff !important;
}

/* Hide mobile menu on desktop */
@media (min-width: 769px) {
  #mobile-menu {
    display: none !important;
  }
}

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

::-webkit-scrollbar-track {
  background: #0a0a0a; /* sync-background */
}

::-webkit-scrollbar-thumb {
  background: #333333; /* sync-border */
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3; /* sync-text-secondary */
}

/* Fade-in Animation Classes */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.fade-in-section.visible,
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* CINEMATIC BLENDING */

/* Background Blending Utility - Specific to hero sections */
.hero-blend-bottom {
  position: relative;
}

.hero-blend-bottom::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30vh; /* Fade out over bottom 30% of viewport */
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0) 0%,
    rgba(10, 10, 10, 1) 100%
  );
  pointer-events: none;
  z-index: 20;
}

/* -------------------------------
   Safe section-level blending - ONLY for sections with background images
   Apply to sections that have background images or need blending
   ------------------------------- */
section[style*="background-image"],
section.bg-cover,
section.hero-section,
.hero-section {
  position: relative;
  z-index: 0;
}

section[style*="background-image"]::after,
section.bg-cover::after,
section.hero-section::after,
.hero-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18vh;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0) 0%,
    rgba(10, 10, 10, 0.95) 100%
  );
  pointer-events: none;
  z-index: 1;
  transition: opacity 300ms ease;
}

/* Sections that explicitly don't want blending can opt-out */
.no-blend::after {
  display: none;
}

/* Lightweight page transition helpers (GPU-accelerated, prefers-reduced-motion aware) */
.page-transition {
  will-change: opacity, transform;
  transition:
    opacity 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.page-enter {
  opacity: 0;
  transform: translateY(8px);
}

.page-exit {
  opacity: 0;
  transform: translateY(0);
  pointer-events: none;
}

/* Disable transitions for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .page-transition {
    transition: none;
  }
  .page-enter {
    transform: none;
  }
}

/* Micro-interactions (only opacity/transform) */
button,
.btn,
.font-header-nav a {
  transition:
    opacity 180ms ease,
    color 180ms ease;
}
.btn:hover,
button:hover {
  opacity: 0.94;
}
.product-card,
.postcard,
.card {
  transition: transform 180ms ease;
  will-change: transform;
}
.product-card:hover,
.postcard:hover,
.card:hover {
  transform: translateY(-3px);
}
.font-header-nav a:hover {
  opacity: 0.92;
}
