@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #d11f26; /* Trade Magnate Logo Red */
  --primary-hover: #b0181f; /* Darker red on hover */
  --secondary-color: #1a1a1a; /* Dark charcoal */
  --bg-color: #ffffff; /* Bright Theme Default */
  --text-color: #111111; /* Clean high contrast text */
  --card-bg: #f8f9fc; /* Soft modern card off-white */
  
  --glass-bg: rgba(255, 255, 255, 0.85); /* Modern frost */
  --glass-border: rgba(0, 0, 0, 0.05);
  --glass-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.06); /* Soft airy shadow */
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Typography elements */
h1, h2 {
  font-weight: 800; /* Ultra-bold for high tension */
  letter-spacing: -0.04em; /* Tight tracking */
  line-height: 1.1;
  margin-bottom: var(--spacing-sm);
}

h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: clamp(3rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); }
h3 { font-size: 1.5rem; }

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul { list-style: none; }

/* Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: 8rem 0; /* Expanded white-space */
}

.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 10px 30px -5px rgba(209, 31, 38, 0.4); /* Floating modern glow */
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px -5px rgba(209, 31, 38, 0.6);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid rgba(17, 17, 17, 0.2);
  color: var(--text-color);
}

.btn-outline:hover {
  border-color: var(--text-color);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -5px rgba(0,0,0,0.1);
}

/* Glassmorphism Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
}

header.scrolled {
  padding: 0.8rem 0;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text span.sub {
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--primary-color);
}
.logo-img {
  height: 45px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.logo-container:hover .logo-img {
  transform: scale(1.05);
}

.footer-logo {
  height: 75px; 
  width: auto;
  margin-bottom: 2rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
}

[data-theme="dark"] .footer-logo {
  filter: drop-shadow(0 0 10px rgba(209, 31, 38, 0.15));
}

.footer-logo:hover {
  transform: scale(1.08) translateY(-5px);
  filter: drop-shadow(0 10px 20px rgba(209, 31, 38, 0.3)) !important;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-tagline {
    color: #aaa;
    max-width: 300px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    font-style: italic;
    border-left: 2px solid var(--primary-color);
    padding-left: 1rem;
}

.footer-socials {
    margin-top: 2rem;
    display: flex;
    gap: 20px;
}

.footer-socials a {
    font-size: 1.5rem;
    color: #888;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

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

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


.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

/* Footer */
footer {
  background-color: #050505;
  color: #fff;
  padding: var(--spacing-xl) 0 var(--spacing-md);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #ccc;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  font-size: 0.9rem;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    right: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Galaxy Watermark (About Page) */
.galaxy-watermark {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?q=80&w=2500&auto=format&fit=crop') center center / cover no-repeat;
  pointer-events: none;
  z-index: -1;
  filter: grayscale(100%) invert(100%);
  opacity: 0.03;
}

/* Floating Contact Actions */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.whatsapp-float, .email-float {
    color: #FFF;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.whatsapp-float {
    background-color: #25D366;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.email-float {
    background-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(209, 31, 38, 0.4);
}

.email-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(209, 31, 38, 0.6);
}


/* 2-second Loading Landing Screen */
#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #050505;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

/* Thrilling Circle Animation Update */
.thrilling-loader {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring {
  position: absolute;
  border-radius: 50%;
  border: 4px solid transparent;
  animation: rotate linear infinite;
}

.ring-1 {
  width: 100%;
  height: 100%;
  border-top-color: var(--primary-color);
  animation-duration: 2s;
}

.ring-2 {
  width: 80%;
  height: 80%;
  border-bottom-color: #fff;
  animation-duration: 1.5s;
  animation-direction: reverse;
}

.ring-3 {
  width: 60%;
  height: 60%;
  border-left-color: var(--primary-color);
  animation-duration: 1s;
}

.loader-logo {
  width: 50px;
  height: 50px;
  background: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(209, 31, 38, 0.5);
  animation: pulse 1s infinite ease-in-out;
}

.loader-logo svg {
  width: 30px;
  height: 30px;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.orbiting-text-container {
  position: absolute;
  width: 250px;
  height: 250px;
  pointer-events: none;
  animation: orbit-rotate 8s linear infinite;
}

.orbiting-text-container text {
  text-transform: uppercase;
  font-family: inherit;
}

@keyframes orbit-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: difference;
  transition: transform 0.1s ease;
}

.cursor-follower {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
}

/* Interactivity Enhancements */
.service-card, .portfolio-item, .feature-pill {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.4s ease, 
              border-color 0.4s ease;
}

.service-card:hover, .portfolio-item:hover, .feature-pill:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 0 15px rgba(209, 31, 38, 0.1);
  border-color: rgba(209, 31, 38, 0.2);
}

.btn-primary {
  overflow: hidden;
  position: relative;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: rotate(45deg);
  transition: 0.8s;
  pointer-events: none;
}

.btn-primary:hover::after {
  left: 150%;
}

/* Click Ripple */
.ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-effect 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Hide default cursor only if needed, keeping it for now for accessibility */
/* body { cursor: none; } */

/* Universal Footer Styles */
.extreme-footer {
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 3rem 1rem !important;
    text-align: center;
    font-weight: 800;
    color: var(--text-color);
    border-top: 1px solid rgba(209,31,38,0.2) !important;
    background: transparent;
}

[data-theme="dark"] .extreme-footer {
    color: #fff;
}

/* Background Intense Expanding Ripples */
.extreme-footer::before, .extreme-footer::after, .extreme-footer .ripple-core {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: transparent;
    border: 4px solid rgba(209, 31, 38, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0;
}

.extreme-footer:hover::before, 
.extreme-footer:hover::after, 
.extreme-footer:hover .ripple-core {
    animation: tsunamiBackground 3s infinite cubic-bezier(0.1, 0.8, 0.3, 1);
}

.extreme-footer:hover::after { animation-delay: 1s; }
.extreme-footer:hover .ripple-core { animation-delay: 2s; border-color: rgba(0,0,0,0.1); }

@keyframes tsunamiBackground {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
        border-width: 20px;
    }
    100% {
        width: 250vw;
        height: 250vw;
        opacity: 0;
        border-width: 1px;
    }
}

/* Wording Ripple/Wave */
.extreme-footer span.ripple-text {
    display: inline-block;
    background: linear-gradient(90deg, #111, #d11f26, #111);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 2px 5px rgba(209, 31, 38, 0.1);
    transition: all 0.3s ease;
}

[data-theme="dark"] .extreme-footer span.ripple-text {
    background: linear-gradient(90deg, #fff, #d11f26, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
}

.extreme-footer:hover span.ripple-text {
    animation: textTsunami 2.5s infinite alternate ease-in-out;
}

@keyframes textTsunami {
    0% {
        background-position: 0% center;
        transform: scale(1) translateY(0) rotate(0deg);
        filter: drop-shadow(0 1px 1px rgba(209,31,38,0.1));
    }
    100% {
        background-position: 200% center;
        transform: scale(1.04) translateY(-2px) rotate(0.2deg);
        filter: drop-shadow(0 5px 5px rgba(209,31,38,0.2));
        letter-spacing: 1px;
    }
}

/* Homepage Specific Styles (moved from internal) */
.tech-stack-banner {
    background-color: #000;
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}

[data-theme="light"] .tech-stack-banner {
    background-color: #f1f1f1;
}

.tech-stack-marquee {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marqueeScroll 25s linear infinite;
    gap: 5rem;
    padding: 0 2rem;
    width: max-content;
    align-items: center;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 2.5rem)); }
}

.marquee-content i {
    font-size: 3rem;
    opacity: 1;
    transition: var(--transition);
    border-radius: 50%;
    display: inline-flex;
}

.marquee-content i:hover {
    transform: scale(1.15);
    animation: waterRipple 1.2s infinite ease-out;
}

@keyframes waterRipple {
    0% { box-shadow: 0 0 0 0 currentColor; }
    100% { box-shadow: 0 0 0 25px transparent; }
}

.hero-desc {
    max-width: 700px;
}

/* Subpage Premium Transition */
.subpage-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #050505;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1.2s cubic-bezier(0.86, 0, 0.07, 1);
    pointer-events: none;
}

.subpage-loader.ready {
    transform: translateY(-100%);
}

.subpage-loader .mini-ring {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(209, 31, 38, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}
