/* =======================================================
   1. ROOT VARIABLES AND FLUID DESIGN SYSTEM 
   ======================================================= */
:root {
  /* Theme Colors (Orange/Dark) */
  --color-primary: #FF6B00;
  --color-primary-light: #FF8C42;
  --color-primary-dark: #E55C00;
  --color-secondary: #FF9E00;
  --color-accent: #FFBB33;

  /* Background & Text Colors */
  --color-bg: #0D0D0D; /* Sleekest background */
  --color-bg-light: #1A1A1A; /* Used for sections/popups */
  --color-text: #FFFFFF;
  --color-text-light: rgba(255, 255, 255, 0.75);
  --color-border: rgba(255, 255, 255, 0.1);
  --color-shadow: rgba(0, 0, 0, 0.4);

  /* Typography */
  --font-base: 'Inter', sans-serif;
  --font-heading: 'Orbitron', sans-serif;
  
  /* Fluid Spacing (Min, Preferred, Max) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: clamp(1rem, 2vw + 0.5rem, 1.5rem);
  --space-lg: clamp(1.5rem, 3vw + 0.5rem, 2rem);
  --space-xl: clamp(2rem, 5vw + 1rem, 3.5rem); 

  /* Fluid Typography */
  --font-size-base: clamp(0.9rem, 0.5vw + 0.8rem, 1rem); 
  --font-size-small: clamp(0.75rem, 0.5vw + 0.7rem, 0.9rem);

  /* Transitions */
  --transition: 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}


/* =======================================================
   2. BASE & LAYOUT STYLES
   ======================================================= */
.footer {
  position: relative;
  background: var(--color-bg);
  color: var(--color-text);
  padding: var(--space-xl) 0 var(--space-sm); /* Adjusted padding */
  font-family: var(--font-base);
  overflow: hidden;
  border-top: 2px solid var(--color-primary-dark);
}

/* --- Background Effects --- */
.footer-background {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.particles {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 107, 0, 0.04) 0%, transparent 70%),
    radial-gradient(circle at 80% 70%, rgba(255, 158, 0, 0.04) 0%, transparent 70%);
  background-size: 200% 200%;
  animation: gradient-move 20s infinite alternate;
}

.gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 13, 13, 0.95) 0%,
    rgba(13, 13, 13, 0.8) 50%,
    rgba(13, 13, 13, 0.7) 100%
  );
}

@keyframes gradient-move {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* --- Main Grid Container --- */
.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Auto-fit grid */
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
}

/* GSAP/Tilt Helpers */
.tilt-element {
    will-change: transform; 
    transition: transform 0.5s cubic-bezier(.03,.98,.52,.99);
}


/* =======================================================
   3. FOOTER SECTIONS (BRAND, NAV, CONNECT)
   ======================================================= */

/* --- Brand Section --- */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.logo-container {
  width: clamp(150px, 20vw, 250px);
}

.footer-logo {
  width: 100%;
  height: auto;
  fill: var(--color-primary);
  transition: transform var(--transition);
}

/* logoPulse animation kept from original */

.brand-tagline {
  color: var(--color-text-light);
  font-size: var(--font-size-small);
  line-height: 1.5;
  max-width: 300px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text-light);
  text-decoration: none;
  transition: color var(--transition);
  font-size: var(--font-size-small);
}

.contact-link:hover {
  color: var(--color-primary-light);
}

.contact-icon {
  width: clamp(16px, 1.5vw + 14px, 18px);
  height: clamp(16px, 1.5vw + 14px, 18px);
  fill: currentColor;
  transition: transform var(--transition);
}

/* --- Navigation --- */
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.nav-heading, .connect-heading {
  font-size: clamp(1.1rem, 1.2vw + 0.8rem, 1.3rem);
  font-weight: 700;
  color: var(--color-primary);
  position: relative;
  margin-bottom: var(--space-xs);
  padding-left: 0; /* Remove padding to handle marker with pseudo-element */
}

/* Sleek Underline Marker */
.nav-heading::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}

.footer-nav:hover .nav-heading::after {
  width: 70px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Slightly reduced gap for sleekness */
}

.nav-link {
  color: var(--color-text-light);
  text-decoration: none;
  transition: all var(--transition);
  font-size: var(--font-size-small);
  position: relative;
  padding-left: var(--space-sm);
}

/* Sleek Arrow Marker */
.nav-link::before {
  content: "»"; /* Changed to double arrow for sleek look */
  position: absolute;
  left: 0;
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.3s ease-out;
  color: var(--color-primary);
}

.nav-link:hover {
  color: var(--color-primary-light);
}

.nav-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* --- Stay Connected --- */
.footer-connect {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.connect-description {
  color: var(--color-text-light);
  font-size: var(--font-size-small);
  line-height: 1.5;
}

/* =======================================================
   4. INPUT & SUBSCRIBE FORM
   ======================================================= */
.subscribe-form {
  max-width: 400px;
}

.input-group {
  position: relative;
  display: flex;
  border-radius: 50px; /* Fully rounded */
  overflow: hidden;
  box-shadow: 0 4px 15px var(--color-shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: box-shadow var(--transition), border-color var(--transition);
  
}

.input-group:focus-within {
  border-color: var(--color-primary);
}

.subscribe-input {
  flex: 1;
  padding: 0.75rem var(--space-md);
  border: none;
  background: var(--color-bg-light); 
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: var(--font-size-small);
  transition: all var(--transition);
}

.subscribe-input::placeholder {
  color: var(--color-text-light);
  opacity: 0.7;
}

.subscribe-input:focus {
  outline: none;
}

.subscribe-button {
  padding: 0 var(--space-md);
  background: var(--color-primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  flex-shrink: 0; /* Prevents button from shrinking */
}

.subscribe-button:hover {
  background: var(--color-primary-light);
}

.submit-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform var(--transition);
}

/* =======================================================
   5. ADVANCED SOCIAL LINKS (Glowing Ring & Ripple)
   ======================================================= */
.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.social-link {
  width: clamp(36px, 4vw, 44px); 
  height: clamp(36px, 4vw, 44px); 
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Base Style */
  background: #181818; 
  color: var(--color-text); 
  position: relative;
  overflow: visible; /* Important for the glowing ring effect */
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  
  border: 1px solid rgba(255, 255, 255, 0.15); /* Soft inner border */
  box-shadow: 0 0 0 0 var(--color-primary); 
}

/* Pseudo-element for the Glowing Ring Effect */
.social-link::before {
  content: '';
  position: absolute;
  top: -2px; /* Slight offset to make the glow appear outside */
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  
  /* Conic Gradient for the rotating glow */
  background: conic-gradient(
    from 180deg at 50% 50%, 
    var(--color-primary) 0%, 
    transparent 40%, 
    transparent 60%, 
    var(--color-secondary) 100%
  );
  
  mask: radial-gradient(circle at center, transparent 70%, black 70.5%);
  
  transform: scale(0.8); 
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  z-index: 0;
}

.social-link:hover {
  background: #222; 
  color: var(--color-primary-light); 
  border-color: var(--color-primary); 
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.4); 
}

.social-link:hover::before {
  transform: scale(1.1);
  opacity: 1;
  animation: glow-rotate 4s linear infinite;
}

@keyframes glow-rotate {
  to {
    transform: scale(1.1) rotate(360deg);
  }
}

.social-link svg {
  width: clamp(18px, 2vw, 22px); 
  height: clamp(18px, 2vw, 22px); 
  fill: currentColor; 
  transition: transform 0.3s, fill 0.3s;
  z-index: 1; 
}

/* Instagram special: gradient background with white glyph */
.social-link.instagram svg {
  stroke: currentColor; /* make outlines use the icon color */
  fill: none; /* default to no fill for stroke-based glyph */
  stroke-width: 2; /* thicker stroke for visibility */
}
.social-link.instagram svg circle.dot {
  fill: currentColor; /* small top-right dot filled */
}
.social-link.instagram:hover {
  color: #ffffff; /* force glyph to white on hover */
}

/* Ripple Effect (Used by JS) */
.social-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 80%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    z-index: 10;
}

/* =======================================================
   6. FOOTER BOTTOM & LEGAL
   ======================================================= */
.footer-bottom {
  border-top: 1px solid rgba(255, 107, 0, 0.2);
  padding: var(--space-md) 0;
  background: rgba(13, 13, 13, 0.8); /* Semi-transparent for subtle depth */
}

.footer-legal {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding: 0 var(--space-md);
}

.copyright {
  color: var(--color-text-light);
  font-size: clamp(0.7rem, 0.5vw + 0.7rem, 0.85rem);
}

.legal-links {
  display: flex;
  gap: var(--space-md);
}

.legal-link {
  color: var(--color-text-light);
  text-decoration: none;
  font-size: clamp(0.7rem, 0.5vw + 0.7rem, 0.85rem);
  transition: color var(--transition);
  position: relative;
}

.legal-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--color-primary);
  transition: width 0.4s ease, left 0.4s ease;
}

.legal-link:hover {
  color: var(--color-primary-light);
}

.legal-link:hover::after {
  width: 100%;
  left: 0;
}

/* =======================================================
   7. BACK TO TOP BUTTON
   ======================================================= */
.back-to-top {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-light);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 107, 0, 0.6);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}


/* =======================================================
   8. RESPONSIVE MEDIA QUERIES (Ultra Responsive)
   ======================================================= */

/* Desktop / Larger Tablet Adjustment */
@media (min-width: 769px) {
  .footer-container {
    /* Set to a clear 3-column layout where Brand spans 2, or 4 equal columns */
    grid-template-columns: 2fr 1fr 1fr; /* Brand wider, others narrower */
  }
}

/* Medium Devices (Tablet to Small Desktop) */
@media (max-width: 1024px) {
    .footer-container {
        gap: var(--space-lg);
    }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .footer-container {
    /* Two-column layout */
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small Devices (Mobile - 480px and below) */
@media (max-width: 480px) {
  .footer-container {
    /* Stacked single column for maximum readability */
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
  }

  .footer-brand {
    align-items: flex-start; 
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-md);
  }
  
  .footer-nav,
  .footer-connect {
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
  }

  .footer-legal {
    /* Stack bottom bar content for max readability */
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
  }
  
  .legal-links {
    justify-content: center;
  }
}


/* =======================================================
   9. FEATURE OVERLAY (Sleek Styling)
   ======================================================= */

.feature-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75); /* Darker overlay */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 400ms ease;
  z-index: 9999;
}

.feature-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.overlay-inner {
  width: min(1200px, 94vw);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-areas: "image text";
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--color-bg), #181818);
  border: 1px solid rgba(255, 107, 0, 0.2);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(255, 255, 255, 0.05);
  transform: translateY(30px);
  opacity: 0;
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.feature-overlay.active .overlay-inner {
  opacity: 1;
  transform: translateY(0);
}

.overlay-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-primary-dark);
  background: rgba(30, 30, 30, 0.9);
  color: var(--color-primary-light);
  font-size: 24px;
  cursor: pointer;
  transition: all 250ms ease;
  z-index: 2;
  box-shadow: 0 0 5px rgba(255, 107, 0, 0.2);
}
.overlay-close:hover {
  transform: scale(1.1);
  background: var(--color-primary);
  color: var(--color-text);
}

.overlay-text {
  grid-area: text;
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 600ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0.1s;
}
.feature-overlay.active .overlay-text {
  opacity: 1;
  transform: translateX(0);
}

.overlay-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--color-primary-light);
  margin-bottom: 10px;
}

.overlay-description {
  color: var(--color-text-light);
  line-height: 1.6;
  font-size: var(--font-size-base);
}

.overlay-actions {
  margin-top: var(--space-md);
}

.play-btn {
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 300ms ease, box-shadow 300ms ease;
  box-shadow: 0 5px 20px rgba(255, 107, 0, 0.4);
}
.play-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 30px rgba(255, 107, 0, 0.6);
}

.overlay-image-wrap {
  grid-area: image;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 50px var(--color-shadow);
  background: #111;
}

.overlay-image {
  width: 100%;
  height: clamp(300px, 45vh, 500px); /* Fluid height */
  object-fit: cover;
  border-radius: 12px;
  transform-origin: center center;
  transform: scale(0.9) translateX(-30px);
  transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-overlay.active .overlay-image {
  transform: scale(1) translateX(0);
}

body.modal-open {
  overflow: hidden;
}

/* Overlay Responsive Adjustments */
@media (max-width: 860px) {
  .overlay-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "text";
    text-align: center;
    gap: var(--space-md);
  }

  .overlay-image {
    height: 300px; /* smaller fixed height */
  }

  .overlay-close {
    top: 10px;
    right: 10px;
  }
}