/* ===== BELTRA GOLD - Advanced Animations ===== */
/* Hardware-accelerated properties: transform, opacity, filter */
/* All animations use will-change for GPU compositing */

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

/* --- Page Load Overlay --- */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

.loader-logo {
  font-family: var(--font-heading);
  font-size: 42px;
  color: var(--gold);
  letter-spacing: 4px;
  opacity: 0;
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: var(--dark-tertiary);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loader-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  border-radius: 2px;
}

/* --- GSAP Initial States (set via CSS to prevent FOUC) --- */
.gsap-reveal {
  opacity: 0;
  transform: translateY(60px);
  will-change: transform, opacity;
}

.gsap-reveal-left {
  opacity: 0;
  transform: translateX(-80px);
  will-change: transform, opacity;
}

.gsap-reveal-right {
  opacity: 0;
  transform: translateX(80px);
  will-change: transform, opacity;
}

.gsap-scale {
  opacity: 0;
  transform: scale(0.85);
  will-change: transform, opacity;
}

.gsap-stagger {
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}

.gsap-fade {
  opacity: 0;
  will-change: opacity;
}

/* --- Hero Enhancements --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  overflow: hidden;
}

.hero-char {
  display: inline-block;
  transform: translateY(120%);
  opacity: 0;
}

.hero .tagline {
  clip-path: inset(0 100% 0 0);
}

.hero .btn {
  opacity: 0;
  transform: translateY(20px);
}

/* Gold shimmer on hero title */
@keyframes goldShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.hero h1.shimmer-active {
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    var(--gold-light) 25%,
    #FFF 50%,
    var(--gold-light) 75%,
    var(--gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShimmer 4s linear infinite;
}

/* --- Header Scroll Transform --- */
.site-header {
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.site-header.scrolled .header-top {
  padding: 6px 0;
  transition: padding 0.4s ease;
}

.site-header.scrolled .logo-icon {
  width: 36px;
  height: 36px;
  font-size: 14px;
  transition: all 0.4s ease;
}

.site-header.scrolled .logo-text {
  font-size: 20px;
  transition: font-size 0.4s ease;
}

/* --- Stats Counter Animation --- */
.stat-item h3 {
  transition: transform 0.3s ease;
}

.stat-item:hover h3 {
  transform: scale(1.15);
}

/* --- Project Card Advanced Hover --- */
.project-card {
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 30px rgba(200,151,46,0.1);
}

.project-card-image {
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
}

.project-card:hover .project-card-image {
  transform: scale(1.05);
}

/* --- Value Icon / Image Hover --- */
.value-icon {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.value-item:hover .value-icon img {
  transform: scale(1.08);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* --- Team Photo Hover --- */
.team-photo {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.3s ease,
              box-shadow 0.5s ease;
}

.team-card:hover .team-photo {
  transform: scale(1.08);
  border-color: var(--gold-light);
  box-shadow: 0 0 30px rgba(200,151,46,0.25);
}

/* --- Timeline Animated Line --- */
.timeline::before {
  transform-origin: top;
  transform: scaleY(0);
  transition: none; /* Controlled by GSAP */
}

.timeline-dot {
  transform: scale(0);
  transition: none; /* Controlled by GSAP */
}

.timeline-content {
  opacity: 0;
  transition: none; /* Controlled by GSAP */
}

/* --- CTA Banner Parallax Shimmer --- */
.cta-banner {
  position: relative;
  overflow: hidden;
}

.cta-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(200,151,46,0.08) 0%, transparent 70%);
  animation: ctaFloat 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ctaFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(3%, -3%) rotate(1deg); }
  66% { transform: translate(-2%, 2%) rotate(-1deg); }
}

/* --- News Item Slide-in --- */
.news-item {
  will-change: transform, opacity;
}

/* --- Button Glow Effect --- */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::after {
  width: 300px;
  height: 300px;
}

/* --- Magnetic Cursor Effect Target --- */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* --- Section Divider Lines --- */
.section-line {
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 40px;
  will-change: width;
}

/* --- Parallax Layers --- */
.parallax-wrap {
  position: relative;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  inset: -20%;
  will-change: transform;
  pointer-events: none;
}

/* --- Footer Reveal --- */
.site-footer .footer-col {
  opacity: 0;
  transform: translateY(30px);
  will-change: transform, opacity;
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  z-index: 10000;
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
}

/* --- Gold Particle Styles --- */
.gold-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

/* --- Page Header Parallax --- */
.page-header {
  overflow: hidden;
  position: relative;
}

.page-header h1 {
  will-change: transform;
}

/* --- Investor Highlight Glow --- */
.investor-highlight {
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.investor-highlight:hover {
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(200,151,46,0.15);
}

/* --- Form Focus Animations --- */
.form-group input,
.form-group textarea,
.form-group select {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,151,46,0.15);
  transform: translateY(-1px);
}

/* --- Sidebar Panel Hover --- */
.sidebar-panel {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s ease;
}

.sidebar-panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* --- Stats Bar Scroll Reveal --- */
.stats-bar .stat-item {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  will-change: transform, opacity;
}

/* --- Smooth Section Transitions --- */
.section, .section-dark, .section-alt {
  position: relative;
}
