/* Supreme Contracting Services — Premium Design System */
/* Fonts loaded via <link> tags in HTML */

:root {
  --color-primary: #1C1917;
  --color-secondary: #57534E;
  --color-cta: #CA8A04;
  --color-cta-hover: #A16207;
  --color-background: #FAFAF9;
  --color-text: #1C1917;
  --color-white: #FFFFFF;
  --color-border: #E7E5E4;
  --color-gold: #CA8A04;
  --shadow-sm: 0 1px 2px rgba(28,25,23,0.04);
  --shadow-md: 0 4px 12px rgba(28,25,23,0.06), 0 1px 3px rgba(28,25,23,0.04);
  --shadow-lg: 0 12px 32px rgba(28,25,23,0.08), 0 4px 8px rgba(28,25,23,0.04);
  --shadow-xl: 0 24px 48px rgba(28,25,23,0.12);
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 80ms; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 160ms; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 240ms; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 320ms; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 400ms; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 480ms; }
.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}
.stagger-children:not(.visible) > * {
  opacity: 0;
  transform: translateY(20px);
}

/* ========================================
   GOLD ACCENT LINES
   ======================================== */

.gold-line {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
}
.gold-line-center {
  width: 48px;
  height: 2px;
  background: var(--color-gold);
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   NAVIGATION
   ======================================== */

/* Logo visibility - white on transparent nav, normal on light backgrounds */
#main-nav.bg-transparent .nav-logo {
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

#main-nav:not(.bg-transparent) .nav-logo {
  filter: none;
}

img.h-10.nav-logo {
  height: 120px;
}

@media (max-width: 768px) {
  img.h-10.nav-logo {
    height: 80px;
  }
}

footer img.h-10 {
  height: 120px;
}

/* Frosted glass nav on scroll */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 3px rgba(28,25,23,0.06), 0 0 0 1px rgba(28,25,23,0.03);
}
.nav-scrolled .nav-link { color: var(--color-primary) !important; }
.nav-scrolled .nav-logo { filter: none !important; }

/* Smooth underline animation for nav links */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-gold);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after {
  width: 100%;
}

/* Navigation dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 240px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(28,25,23,0.12), 0 4px 8px rgba(28,25,23,0.08);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  margin-top: 1rem;
  padding: 0.5rem;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-dropdown-item:hover {
  background: var(--color-background);
  color: var(--color-gold);
}

.nav-dropdown-item i {
  width: 18px;
  height: 18px;
  color: var(--color-gold);
  flex-shrink: 0;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary-hover {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(202, 138, 4, 0.3);
}

.btn-ghost-hover {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-ghost-hover:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

/* ========================================
   CARD EFFECTS
   ======================================== */

/* Card with gold top accent */
.card-accent {
  position: relative;
  border-top: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-accent:hover {
  border-top-color: var(--color-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Card image zoom on hover */
.card-img-zoom {
  overflow: hidden;
}
.card-img-zoom img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-img-zoom:hover img {
  transform: scale(1.05);
}

/* Simple card lift on hover */
.card-lift {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   PROJECT OVERLAYS & GALLERY
   ======================================== */

.project-overlay {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.project-card:hover .project-overlay {
  opacity: 1;
}

/* Gallery filter pills */
.filter-pill {
  transition: all 0.25s ease;
  cursor: pointer;
}
.filter-pill.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ========================================
   DECORATIVE ELEMENTS
   ======================================== */

/* Scroll indicator bounce */
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
.scroll-indicator {
  animation: scrollBounce 2.5s ease-in-out infinite;
}

/* Counter numeric stability */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* Decorative section break */
.section-break {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0;
}
.section-break::before,
.section-break::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.4;
}
.section-break .section-break-diamond {
  width: 6px;
  height: 6px;
  background: var(--color-gold);
  transform: rotate(45deg);
  opacity: 0.6;
}

/* ========================================
   MOBILE MENU
   ======================================== */

.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu.open {
  transform: translateX(0);
}

/* ========================================
   GALLERY LIGHTBOX
   ======================================== */

.lightbox {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   BEFORE/AFTER SLIDER
   ======================================== */

.ba-slider {
  position: relative;
  overflow: hidden;
  cursor: col-resize;
}
.ba-slider .ba-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}
.ba-slider .ba-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: white;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  z-index: 2;
}
.ba-slider .ba-after img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   FAQ ACCORDION
   ======================================== */

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: 0;
  padding-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .faq-item.open .faq-answer {
    padding-bottom: 2rem;
  }
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}
.faq-icon {
  transition: transform 0.3s ease;
}

/* ========================================
   TESTIMONIAL QUOTE
   ======================================== */

.testimonial-quote {
  position: relative;
}
.testimonial-quote::before {
  content: '\201C';
  font-family: 'Playfair Display', serif;
  font-size: 6rem;
  line-height: 1;
  color: var(--color-gold);
  opacity: 0.15;
  position: absolute;
  top: -16px;
  left: -4px;
}

/* ========================================
   HERO TEXT SHIMMER (subtle gold shimmer on heading)
   ======================================== */

@keyframes subtleShine {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.hero-title-shine {
  background: linear-gradient(
    90deg,
    #FFFFFF 0%,
    #FFFFFF 40%,
    #FDE68A 50%,
    #FFFFFF 60%,
    #FFFFFF 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: subtleShine 8s linear infinite;
}

/* ========================================
   SMOOTH IMAGE REVEAL
   ======================================== */

.img-reveal {
  overflow: hidden;
  border-radius: 12px;
}
.img-reveal img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}
.img-reveal:hover img {
  transform: scale(1.03);
}

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--color-gold);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(202, 138, 4, 0.3);
  z-index: 40;
}

.scroll-to-top:hover {
  background: var(--color-cta-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(202, 138, 4, 0.4);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .fade-in-up, .stagger-children > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-indicator { animation: none; }
  .hero-title-shine {
    animation: none;
    -webkit-text-fill-color: white;
    background: none;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
