/* ═══════════════════════════════════════════
   ALL PHASE LASER — Custom Styles
   Dark luxury aesthetic with gold accents
   ═══════════════════════════════════════════ */

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

html {
  scroll-padding-top: 5rem;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(201, 168, 76, 0.3);
  color: #f0ede6;
}

/* ─── Noise / Grain Texture Overlay ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ─── Gold Gradient Text ─── */
.gold-text-gradient {
  background: linear-gradient(135deg, #dfc06b, #c9a84c, #a8882f, #c9a84c);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ─── Buttons ─── */
.btn-gold {
  display: inline-block;
  background: linear-gradient(135deg, #c9a84c, #a8882f);
  color: #09090b;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #dfc06b, #c9a84c);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.3);
}

.btn-gold:hover::before {
  opacity: 1;
}

.btn-gold span,
.btn-gold {
  position: relative;
  z-index: 1;
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: #f0ede6;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  padding: 0.875rem 2rem;
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-outline:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: #c9a84c;
  transform: translateY(-2px);
}

/* ─── Hero Background ─── */
.hero-bg {
  background:
    radial-gradient(ellipse at 30% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(201, 168, 76, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, #141416 0%, #09090b 50%, #141416 100%);
}

/* ─── Laser Trace Animation ─── */
/* Gold → blue → gold sweep. The blue pickup comes from the logo palette. */
.laser-trace {
  background: linear-gradient(90deg,
    transparent 0%,
    transparent 35%,
    rgba(201, 168, 76, 0.5) 45%,
    rgba(42, 150, 224, 0.7) 50%,
    rgba(201, 168, 76, 0.5) 55%,
    transparent 65%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: laser-sweep 4s ease-in-out infinite;
  filter: blur(0.5px);
}

.laser-trace::after {
  content: '';
  position: absolute;
  inset: -2px 0;
  background: linear-gradient(90deg,
    transparent 0%,
    transparent 35%,
    rgba(201, 168, 76, 0.12) 45%,
    rgba(42, 150, 224, 0.2) 50%,
    rgba(201, 168, 76, 0.12) 55%,
    transparent 65%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: laser-sweep 4s ease-in-out infinite;
  filter: blur(8px);
}

/* ─── Logo Breathing Room ─── */
/* Soft blue drop-shadow that follows the logo's actual shape.
   Picks up the logo's blue tones so it doesn't feel like a foreign object
   on a pure-black background. */
img[src$="logo.png"] {
  filter: drop-shadow(0 0 14px rgba(42, 150, 224, 0.18));
}

@keyframes laser-sweep {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* ─── Scroll Indicator ─── */
.scroll-indicator {
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.5); }
}

/* ─── Social Proof Scrolling ─── */
.social-proof-track {
  width: max-content;
}

.animate-scroll {
  animation: scroll-left 40s linear infinite;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Pause on hover */
.social-proof-track:hover .animate-scroll {
  animation-play-state: paused;
}

/* ─── Navbar States ─── */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(9, 9, 11, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(42, 42, 46, 0.3);
}

/* ─── Mobile Menu Active State ─── */
#mobile-menu.active {
  transform: translateX(0);
}

/* Menu toggle animation */
.menu-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.menu-open .menu-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.menu-open .menu-line:nth-child(3) {
  width: 1.75rem;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ─── Scroll Reveal Animations ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-delay-1.visible { transition-delay: 0.15s; }
.reveal-delay-2.visible { transition-delay: 0.3s; }
.reveal-delay-3.visible { transition-delay: 0.45s; }
.reveal-delay-4.visible { transition-delay: 0.6s; }

/* Fallback: if JS hasn't loaded after 3s, show everything */
@keyframes reveal-fallback {
  to { opacity: 1; transform: translateY(0); }
}
.reveal:not(.visible) {
  animation: reveal-fallback 0s 3s forwards;
}

/* ─── Filter Buttons (Portfolio Page) ─── */
.filter-btn {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  padding: 0.5rem 1.25rem;
  background: transparent;
  color: #8a8a8d;
  border: 1px solid rgba(42, 42, 46, 0.6);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-transform: uppercase;
}

.filter-btn:hover {
  color: #c9a84c;
  border-color: rgba(201, 168, 76, 0.4);
}

.filter-btn.active {
  background: linear-gradient(135deg, #c9a84c, #a8882f);
  color: #09090b;
  border-color: transparent;
}

/* Portfolio filter state */
.portfolio-item.filter-hidden {
  display: none;
}

/* ─── Active Nav Link (Multi-Page) ─── */
.nav-link.active-page {
  color: #c9a84c;
}

.nav-link.active-page::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: #c9a84c;
  margin-top: 4px;
}

/* ─── Service Cards ─── */
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c9a84c, transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.service-card:hover::after {
  opacity: 1;
}

/* ─── Portfolio Items ─── */
.portfolio-item {
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-item:hover {
  transform: scale(1.03);
  z-index: 10;
}

.portfolio-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color 0.5s ease;
  border-radius: 2px;
  pointer-events: none;
}

.portfolio-item:hover::after {
  border-color: rgba(201, 168, 76, 0.3);
}

/* ─── Testimonial Cards ─── */
.testimonial-card {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-card:hover {
  border-color: rgba(201, 168, 76, 0.2);
  transform: translateY(-4px);
}

/* ─── Form Focus Glow ─── */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

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

::-webkit-scrollbar-track {
  background: #09090b;
}

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

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

/* ─── Responsive Adjustments ─── */
@media (max-width: 768px) {
  .animate-scroll {
    animation-duration: 25s;
  }

  /* Ensure process connector lines don't show on mobile */
  .process-step .hidden.md\\:block {
    display: none !important;
  }
}

@media (max-width: 640px) {
  /* Tighter spacing on small screens */
  section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}


/* ═══════════════════════════════════════════
   LIGHTBOX — full-size view for portfolio + craft tiles
   ═══════════════════════════════════════════ */

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 11, 0.96);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  padding: 1rem;
}

#lightbox[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.lightbox-stage {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}

#lightbox[aria-hidden="false"] .lightbox-stage {
  transform: scale(1);
}

.lightbox-media {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  display: block;
}

.lightbox-media[hidden] {
  display: none;
}

.lightbox-caption {
  font-family: 'Outfit', sans-serif;
  color: #f0ede6;
  font-size: 0.95rem;
  text-align: center;
  letter-spacing: 0.02em;
  max-width: 90vw;
  margin: 0;
}

.lightbox-caption-tag {
  display: inline-block;
  color: #c9a84c;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-right: 0.75rem;
  font-weight: 500;
}

.lightbox-btn {
  position: absolute;
  background: rgba(20, 20, 22, 0.7);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f0ede6;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 1;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

.lightbox-btn:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: rgba(201, 168, 76, 0.6);
  color: #c9a84c;
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
}

.lightbox-prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-btn[disabled] {
  opacity: 0.25;
  cursor: not-allowed;
}

.lightbox-btn[disabled]:hover {
  background: rgba(20, 20, 22, 0.7);
  border-color: rgba(201, 168, 76, 0.3);
  color: #f0ede6;
}

/* Lock body scroll while lightbox is open */
body.lightbox-open {
  overflow: hidden;
}

/* Make portfolio items obviously clickable */
.portfolio-item {
  cursor: zoom-in;
}

@media (max-width: 640px) {
  .lightbox-btn {
    width: 40px;
    height: 40px;
  }
  .lightbox-close {
    top: 1rem;
    right: 1rem;
  }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-caption {
    font-size: 0.85rem;
  }
}
