/* ================================================================
   XYZ CONSTRUCTION — Premium Styles
   ================================================================ */

/* --- CSS Variables --- */
:root {
  --color-dark: #0D0D0D;
  --color-concrete: #2B2B2B;
  --color-gold: #D4AF37;
  --color-gold-light: #e4c65a;
  --color-off-white: #F5F5F0;
  --color-text: rgba(255, 255, 255, 0.7);
  --color-text-dim: rgba(255, 255, 255, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --neu-light: rgba(255, 255, 255, 0.06);
  --neu-dark: rgba(0, 0, 0, 0.4);
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-body: 'Poppins', sans-serif;
  --font-display: 'Playfair Display', serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-dark);
  color: var(--color-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-dark); }
::-webkit-scrollbar-thumb { background: var(--color-concrete); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-gold); }

/* Selection */
::selection {
  background: rgba(212, 175, 55, 0.3);
  color: white;
}

/* --- Typography --- */
.font-display { font-family: var(--font-display); }

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .section-title { font-size: 3rem; }
}
@media (min-width: 1024px) {
  .section-title { font-size: 3.5rem; }
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* --- Glassmorphism Utilities --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* --- Neumorphism Utilities --- */
.neu-icon {
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(0,0,0,0.15));
  border-radius: 1rem;
  box-shadow: 4px 4px 10px rgba(0,0,0,0.3), -4px -4px 10px rgba(255,255,255,0.04);
}

.neu-icon-sm {
  background: linear-gradient(145deg, rgba(255,255,255,0.07), rgba(0,0,0,0.12));
  border-radius: 0.75rem;
  box-shadow: 3px 3px 8px rgba(0,0,0,0.3), -3px -3px 8px rgba(255,255,255,0.03);
}

/* --- Preloader --- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  margin-bottom: 2rem;
  animation: pulse-glow 1.5s ease-in-out infinite;
}

.loader-logo img {
  height: 60px;
  width: auto;
}

.loader-bar-track {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  border-radius: 4px;
  animation: loader-fill 2s ease-in-out forwards;
}

.loader-text {
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

@keyframes loader-fill {
  0% { width: 0%; }
  50% { width: 65%; }
  100% { width: 100%; }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* --- Custom Cursor --- */
#cursor-dot, #cursor-ring {
  pointer-events: none;
  position: fixed;
  z-index: 9998;
  border-radius: 50%;
  transition: opacity 0.3s ease;
}

#cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--color-gold);
  transform: translate(-50%, -50%);
}

#cursor-ring {
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}

#cursor-ring.hover {
  width: 56px;
  height: 56px;
  border-color: var(--color-gold);
  background: rgba(212, 175, 55, 0.05);
}

@media (hover: none), (max-width: 768px) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* --- Navbar --- */
#navbar {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#navbar.scrolled {
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-links .nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
  padding: 0.25rem 0;
}

.nav-links .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width 0.3s ease;
}

.nav-links .nav-link:hover,
.nav-links .nav-link.active {
  color: white;
}

.nav-links .nav-link:hover::after,
.nav-links .nav-link.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--color-gold);
  color: var(--color-dark);
}

.nav-cta:hover {
  background: var(--color-gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
}

.nav-logo-text {
  font-family: var(--font-display);
  color: white;
}

/* Hamburger */
.hamburger-line {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition-smooth);
}

#hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
#hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Drawer */
#mobile-drawer {
  z-index: 100;
}

#mobile-drawer.open {
  transform: translateX(0);
}

.drawer-overlay {
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.drawer-content {
  background: var(--color-dark);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- Hero Section --- */
.hero-section {
  min-height: 100vh;
}

/* --- Home Tour Slideshow --- */
.hero-tour-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(1);
  will-change: transform, opacity;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide.ken-burns {
  transform: scale(1.08);
}

.hero-slide.exit {
  opacity: 0;
  transform: scale(1.12);
  z-index: 2;
}

/* Tour Dots */
.tour-dots .tour-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: none;
  padding: 0;
}

.tour-dots .tour-dot.active {
  background: var(--color-gold);
  width: 28px;
  border-radius: 5px;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.tour-dots .tour-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Tour Controls */
.hero-tour-controls button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.hero-tour-controls button:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--color-gold);
}

/* Tour Badge */
.hero-tour-badge {
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

/* Hero Parallax (legacy support) */
.hero-parallax {
  will-change: transform;
}

.hero-glass-card {
  background: rgba(13, 13, 13, 0.5);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-title {
  font-family: var(--font-display);
}

.hero-cta-primary {
  background: var(--color-gold);
  color: var(--color-dark);
}

.hero-cta-primary:hover {
  background: var(--color-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.3);
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* Hero Stats */
.hero-stats .stat-card {
  background: rgba(13, 13, 13, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Scroll Indicator */
.scroll-mouse {
  animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes scroll-dot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
}

.animate-scroll-dot {
  animation: scroll-dot 2s ease-in-out infinite;
}

/* Tour Progress Bar */
.hero-tour-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.05);
}

.hero-tour-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  width: 0%;
  transition: width 0.3s linear;
  border-radius: 0 2px 2px 0;
}

/* --- Service Cards --- */
.service-card {
  padding: 0;
  overflow: hidden;
  transform: translateY(0);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.05);
}

.service-icon {
  width: 44px;
  height: 44px;
}

/* --- Why Choose Us --- */
.why-item {
  transition: var(--transition-smooth);
}

.why-item:hover {
  border-color: rgba(212, 175, 55, 0.2);
  transform: translateX(4px);
}

/* Progress Bars */
.progress-track {
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.progress-fill.animated {
  /* Width set via JS */
}

/* --- Projects / Portfolio --- */
.filter-btn {
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.filter-btn:hover {
  color: white;
  border-color: rgba(212, 175, 55, 0.3);
}

.filter-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.project-item {
  padding: 0;
  position: relative;
}

.project-item.hidden {
  display: none;
}

.project-overlay {
  pointer-events: none;
}

/* --- Process Timeline --- */
.timeline-line {
  position: absolute;
  top: 2rem;
  left: 8.33%;
  right: 8.33%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), rgba(212, 175, 55, 0.1));
  transform: translateY(-50%);
}

.process-step .step-number {
  background: rgba(212, 175, 55, 0.1);
  border: 1.5px solid rgba(212, 175, 55, 0.2);
  color: var(--color-gold);
  font-family: var(--font-display);
}

.process-step:hover .step-number {
  background: var(--color-gold);
  color: var(--color-dark);
  border-color: var(--color-gold);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

/* --- Stats Counter --- */
.stat-counter-card {
  transition: var(--transition-smooth);
}

.stat-counter-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.15);
}

/* --- Team Cards --- */
.team-card {
  padding: 0;
  overflow: hidden;
}

.team-card:hover {
  transform: translateY(-8px);
}

/* --- Testimonials Carousel --- */
.testimonial-dot {
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.testimonial-dot.active {
  background: var(--color-gold);
  width: 24px;
  border-radius: 4px;
}

.testimonial-prev,
.testimonial-next {
  cursor: pointer;
}

/* --- Partners Marquee --- */
.partners-marquee {
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.partners-track {
  animation: marquee 30s linear infinite;
  width: fit-content;
}

.partners-track:hover {
  animation-play-state: paused;
}

/* --- Blog Cards --- */
.blog-card {
  padding: 0;
  transition: var(--transition-smooth);
}

.blog-card:hover {
  transform: translateY(-6px);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Form Inputs --- */
.form-input {
  background: rgba(255, 255, 255, 0.03);
  transition: var(--transition-smooth);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-input:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.form-input:focus {
  border-color: var(--color-gold) !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

select.form-input option {
  background: var(--color-dark);
  color: white;
}

/* --- Back to Top --- */
#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* --- Lightbox --- */
#lightbox.show {
  opacity: 1;
  visibility: visible;
}

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

/* Reveal text animation for hero */
.reveal-text {
  overflow: hidden;
}

/* AOS overrides for dark theme */
[data-aos] {
  pointer-events: none;
}
[data-aos].aos-animate {
  pointer-events: auto;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1023px) {
  .timeline-line { display: none; }

  .process-step .step-number {
    margin-bottom: 0.5rem;
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-glass-card {
    padding: 1.5rem;
  }

  .hero-tour-controls {
    bottom: 24px;
  }

  .hero-tour-badge {
    top: 88px;
    left: 1rem;
    font-size: 0.65rem;
  }

  .tour-dots .tour-dot {
    width: 8px;
    height: 8px;
  }

  .tour-dots .tour-dot.active {
    width: 20px;
  }

  .hero-tour-controls button {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .testimonial-prev,
  .testimonial-next {
    display: none;
  }

  .stat-counter-card {
    padding: 1.5rem;
  }

  .partners-track {
    animation-duration: 20s;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }
}

/* ================================================================
   UTILITY HELPERS
   ================================================================ */

/* Glass glow on hover (for service cards, etc.) */
.glow-hover {
  position: relative;
}

.glow-hover::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--color-gold), transparent, var(--color-gold));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.glow-hover:hover::before {
  opacity: 0.15;
}
