/* ========================================
   STAIRWAY JOINERY SOUTHERN - Global Styles
   ======================================== */

html { scroll-behavior: smooth; touch-action: manipulation; }
::selection { background: #c8956c; color: white; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #faf8f5; }
::-webkit-scrollbar-thumb { background: #e8e4de; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9c9590; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid #c8956c;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Nav ---- */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }

/* ---- Mobile nav ---- */
.mobile-nav { transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); }
.mobile-nav.open { transform: translateX(0); }
.mobile-overlay { opacity: 0; pointer-events: none; transition: opacity 0.35s; }
.mobile-overlay.open { opacity: 1; pointer-events: auto; }

/* ---- Cart drawer ---- */
.cart-drawer { transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); }
.cart-drawer.open { transform: translateX(0); }

/* ---- Underline inputs ---- */
.input-underline {
  border: none;
  border-bottom: 1px solid #e8e4de;
  border-radius: 0;
  background: transparent;
  padding: 12px 0;
  font-size: 0.9375rem;
  width: 100%;
  transition: border-color 0.3s;
  outline: none;
}
.input-underline:focus { border-bottom-color: #c8956c; }
.input-underline::placeholder { color: #9c9590; }
.input-underline-dark { border-bottom-color: rgba(255,255,255,0.15); color: #faf8f5; }
.input-underline-dark:focus { border-bottom-color: #c8956c; }
.input-underline-dark::placeholder { color: rgba(255,255,255,0.35); }

/* ---- Light inputs (for cream bg contact page) ---- */
.input-bordered {
  border: 1px solid #e8e4de;
  border-radius: 12px;
  background: white;
  padding: 14px 18px;
  font-size: 0.9375rem;
  width: 100%;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}
.input-bordered:focus {
  border-color: #c8956c;
  box-shadow: 0 0 0 3px rgba(200, 149, 108, 0.1);
}
.input-bordered::placeholder { color: #9c9590; }

/* ---- Product cards ---- */
.product-img-wrap { overflow: hidden; }
.product-img-wrap img { transition: transform 0.6s cubic-bezier(0.4,0,0.2,1); }
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

/* ---- Stock dot ---- */
.stock-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.pulse-dot { animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ---- Filter chips ---- */
.filter-chip.active { background: #1a1a1a; color: #faf8f5; }

/* ---- Qty input ---- */
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input { -moz-appearance: textfield; }

/* ---- FAQ accordion ---- */
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1); }
.faq-answer.open { max-height: 300px; }
.faq-icon { transition: transform 0.3s; }
.faq-icon.open { transform: rotate(45deg); }

/* ---- Drop cap ---- */
.drop-cap::first-letter {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 4.5rem;
  float: left;
  line-height: 0.75;
  margin-right: 0.5rem;
  margin-top: 0.15rem;
  font-weight: 600;
  color: #c8956c;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.7s cubic-bezier(0,0,0.2,1), transform 0.7s cubic-bezier(0,0,0.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Stagger children ---- */
.stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.stagger > .reveal:nth-child(6) { transition-delay: 400ms; }
.stagger > .reveal:nth-child(7) { transition-delay: 480ms; }
.stagger > .reveal:nth-child(8) { transition-delay: 560ms; }

/* ---- Page hero (inner pages) ---- */
.page-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Gallery lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(26,26,26,0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0,0,0.2,1);
}
.lightbox.open img {
  transform: scale(1);
}

/* ---- Success modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(26,26,26,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0,0,0.2,1);
}
.modal-overlay.open .modal-content {
  transform: scale(1) translateY(0);
}

/* ---- Hover card lift ---- */
.card-lift {
  transition: transform 0.4s cubic-bezier(0,0,0.2,1), box-shadow 0.4s;
}
.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(26,26,26,0.1);
}

/* ---- Image overlay ---- */
.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,26,0.6) 0%, transparent 60%);
  border-radius: inherit;
  transition: opacity 0.4s;
}
.img-overlay:hover::after {
  opacity: 0.8;
}

/* ---- Counter animation ---- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Marquee for testimonials ---- */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  animation: marquee 40s linear infinite;
  width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }

/* ---- Logo theming (removed to honour inline SVG fills) ---- */
