/* ============================================================
   Em.Body.Photgraphy — Custom Styles
   ============================================================ */

/* ---- Base & Typography ---- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Jost', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f8f1e9; }
::-webkit-scrollbar-thumb { background: #c26d5a; }
::-webkit-scrollbar-thumb:hover { background: #a55848; }

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

#navbar.scrolled {
  background: rgba(44, 24, 16, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.2);
}

/* ---- Hamburger Animation ---- */
#menu-toggle .hamburger-line {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s ease,
              width 0.3s ease,
              background 0.3s ease;
  transform-origin: center;
}

#menu-toggle.is-open .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#menu-toggle.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#menu-toggle.is-open .hamburger-line:nth-child(3) {
  width: 1.5rem !important;
  margin-left: 0 !important;
  transform: translateY(-8px) rotate(-45deg);
}

/* ---- Mobile Menu ---- */
#mobile-menu {
  transition: visibility 0s linear 0.5s, opacity 0.5s ease;
}
#mobile-menu.is-open {
  visibility: visible !important;
  opacity: 1 !important;
  transition-delay: 0s;
}
#menu-panel {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
#mobile-menu.is-open #menu-panel {
  transform: translateX(0) !important;
}

/* ---- Hero Animations ---- */
.hero-animate {
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

/* Scroll line pulse */
.scroll-line {
  animation: scrollPulse 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.25; }
  50%       { transform: scaleY(0.55); opacity: 0.75; }
}

/* ---- Scroll Reveal ---- */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-up    { transform: translateY(45px); }
.reveal-left  { transform: translateX(-45px); }
.reveal-right { transform: translateX(45px); }

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stagger service cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.10s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.20s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.30s; }
.service-card:nth-child(7) { transition-delay: 0.35s; }

/* Stagger gallery items */
.gallery-item:nth-child(3n+1) { transition-delay: 0.04s; }
.gallery-item:nth-child(3n+2) { transition-delay: 0.10s; }
.gallery-item:nth-child(3n+3) { transition-delay: 0.16s; }

/* Stagger testimonial cards */
.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.25s; }
.testimonial-card:nth-child(4) { transition-delay: 0.10s; }

/* ---- Gallery ---- */
.gallery-item {
  margin-bottom: 0.75rem;
  break-inside: avoid;
}
.gallery-item img {
  display: block;
  width: 100%;
}
.gallery-item.hidden {
  display: none;
}

/* Filter active state */
.filter-btn.active {
  border-color: #c26d5a !important;
  color: #c26d5a !important;
  background: rgba(194, 109, 90, 0.06);
}

/* ---- Lightbox ---- */
#lightbox {
  transition: opacity 0.35s ease;
}
#lightbox.is-open {
  visibility: visible !important;
  opacity: 1 !important;
}
#lightbox-img {
  transition: opacity 0.25s ease;
  box-shadow: 0 25px 80px rgba(0,0,0,0.5);
}

/* ---- Form Styles ---- */
input, textarea, select {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #c26d5a !important;
  box-shadow: 0 0 0 3px rgba(194, 109, 90, 0.12);
}
input::placeholder,
textarea::placeholder {
  color: #a67c6b;
  opacity: 0.45;
}
select option {
  background: #f8f1e9;
  color: #2c1810;
}
/* Custom select arrow */
.select-wrapper {
  position: relative;
}
.select-wrapper::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #8a9a5b;
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238a9a5b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px !important;
  cursor: pointer;
}

/* ---- Parallax ---- */
#hero-bg {
  will-change: transform;
}

/* ---- About decorative frame ---- */
.about-img-wrap::after {
  content: '';
  position: absolute;
  bottom: -14px;
  right: -14px;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(138, 154, 91, 0.3);
  z-index: -1;
  pointer-events: none;
}

/* ---- Button hover effects ---- */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
  letter-spacing: 0.15em;
}
.btn-primary::after,
.btn-secondary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-primary:hover::after,
.btn-secondary:hover::after {
  opacity: 1;
}

/* ---- Testimonial quote mark ---- */
.quote-mark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1;
  user-select: none;
}

/* ---- Footer link underline effect ---- */
footer a:not(.social-link) {
  position: relative;
}
footer ul a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: #c26d5a;
  transition: width 0.3s ease;
}
footer ul a:hover::after {
  width: 100%;
}

/* ---- Instagram grid aspect ratio ---- */
.ig-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

/* ---- Accessibility: Focus rings ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #c26d5a;
  outline-offset: 3px;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-animate {
    opacity: 1 !important;
    animation: none !important;
  }
}

/* ---- Print ---- */
@media print {
  #navbar, #mobile-menu, #lightbox { display: none !important; }
}
