/* ============================================
   STUDIO 26 — Custom Styles
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
}

/* Selection color */
::selection {
  background: #7B2D3B;
  color: #FAF6F1;
}

/* ============================================
   HERO Fade-in Animations
   ============================================ */
.fade-in {
  opacity: 0;
  animation: heroFadeIn 0.8s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .fade-in {
    opacity: 1;
    animation: none;
  }
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background: rgba(250, 246, 241, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
  padding: 0;
}

#navbar.scrolled .font-serif {
  color: #7B2D3B !important;
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu {
  background: rgba(250, 246, 241, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu button animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuToggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menuToggle.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuToggle.active .menu-line:nth-child(3) {
  width: 1.5rem;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Smooth scroll offset for fixed nav
   ============================================ */
section[id] {
  scroll-margin-top: 80px;
}

/* ============================================
   Image lazy loading placeholder
   ============================================ */
img {
  max-width: 100%;
  height: auto;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #bfb29e;
}

/* ============================================
   Focus styles for accessibility
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
}

/* ============================================
   Print styles
   ============================================ */
@media print {
  #navbar, #mobileMenu, footer {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .fade-in, .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
