/* ==========================================================================
   WISTERRA MAIN STYLESHEET
   Core Layout, Typography, Floating Header, Footer & Global Utilities
   ========================================================================== */

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

/* --------------------------------------------------------------------------
   1. CORE RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background-color: var(--neutral-bg-light);
  color: var(--neutral-text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--neutral-bg-light);
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 118, 110, 0.3);
  border-radius: var(--radius-full);
  border: 2px solid var(--neutral-bg-light);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-emerald);
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.25;
  color: var(--secondary-navy);
}

h1 {
  font-size: var(--font-size-hero); /* 3.5rem / 56px */
  letter-spacing: -0.03em;
  font-weight: 600;
}

h2 {
  font-size: var(--font-size-h2); /* 2.5rem / 40px */
  letter-spacing: -0.02em;
  position: relative;
  font-weight: 600;
}

h3 {
  font-size: var(--font-size-h3); /* 1.5rem / 24px */
  letter-spacing: -0.015em;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  color: var(--neutral-text-gray);
  font-size: var(--font-size-body); /* 1rem / 16px */
  line-height: 1.7;
}

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

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

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   2. FLOATING PREMIUM NAVBAR
   -------------------------------------------------------------------------- */
.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--space-lg) var(--space-xl);
  z-index: var(--z-sticky);
  transition: var(--transition-smooth);
}

/* Inner Floating Bar styling */
.header-container {
  max-width: 1300px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: var(--border-glass-light);
  border-radius: var(--radius-full);
  padding: 0.45rem var(--space-xl);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.header-wrapper.scrolled {
  padding: var(--space-sm) var(--space-xl);
}

.header-wrapper.scrolled .header-container {
  background: rgba(255, 255, 255, 0.98);
  border: var(--border-hairline);
  box-shadow: var(--shadow-md);
}

.header-wrapper.scrolled .nav-link {
  color: var(--secondary-navy-light);
}
.header-wrapper.scrolled .nav-link:hover,
.header-wrapper.scrolled .nav-link.active {
  color: var(--primary-emerald);
}

.header-wrapper.scrolled .logo-text {
  color: var(--secondary-navy);
}

.header-wrapper.scrolled .logo-dot {
  background: var(--primary-emerald);
}

/* Logo Design */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xxs);
  cursor: pointer;
  justify-self: start;
}

.logo-text {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--secondary-navy);
  transition: var(--transition-fast);
}

.logo-dot {
  width: 7px;
  height: 7px;
  background: var(--primary-emerald);
  border-radius: var(--radius-full);
  display: inline-block;
  margin-top: 10px;
  transition: var(--transition-fast);
}

/* Desktop Navigation Link Items */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  justify-self: center;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--secondary-navy-light);
  padding: var(--space-xs) 0;
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-emerald);
  transition: var(--transition-fast);
  border-radius: var(--radius-full);
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--primary-emerald);
}

/* Header Buttons container */
.nav-actions {
  display: flex;
  align-items: center;
  justify-self: end;
}

/* Mobile Toggle Hamburger button */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: var(--z-drawer);
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--secondary-navy);
  margin: 6px 0;
  transition: var(--transition-normal);
  border-radius: var(--radius-full);
}

.header-wrapper.scrolled .hamburger span {
  background: var(--secondary-navy);
}

/* Active side menu transformations */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -7px);
}

/* Mobile Side Menu Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--secondary-navy-dark);
  z-index: calc(var(--z-drawer) - 1);
  padding: 8rem var(--space-2xl) var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
}

.mobile-drawer.open {
  right: 0;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.mobile-nav-link {
  font-size: 1.4rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-xs) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--accent-gold);
  padding-left: var(--space-xs);
}

.mobile-drawer-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mobile-drawer-footer .btn {
  width: 100%;
  text-align: center;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(3, 7, 18, 0.6);
  backdrop-filter: blur(4px);
  z-index: calc(var(--z-drawer) - 2);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   3. LUXURY CORPORATE FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--secondary-navy-dark);
  color: rgba(255, 255, 255, 0.8);
  border-top: var(--border-gold-subtle);
  position: relative;
  overflow: hidden;
  padding-top: var(--space-4xl);
}

/* Subtle glow lighting overlay in the footer background */
.footer::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.15) 0%, rgba(3, 7, 18, 0) 70%);
  z-index: var(--z-negative);
  pointer-events: none;
}

.footer::after {
  content: '';
  position: absolute;
  top: -150px;
  left: -150px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, rgba(3, 7, 18, 0) 70%);
  z-index: var(--z-negative);
  pointer-events: none;
}

.footer-top {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-3xl);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-3xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.footer-brand .logo-text {
  color: var(--neutral-white);
}

.footer-brand .logo-dot {
  background: var(--accent-gold);
}

.footer-tagline {
  color: var(--neutral-text-light);
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: var(--space-md);
}

.social-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-white);
  transition: var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-icon:hover {
  background: var(--primary-emerald);
  color: var(--neutral-white);
  border-color: var(--primary-emerald);
  transform: translateY(-3px);
}

.footer-heading {
  color: var(--neutral-white);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-xl);
  position: relative;
  padding-bottom: var(--space-xs);
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background: var(--accent-gold);
  border-radius: var(--radius-full);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-link {
  font-size: 0.95rem;
  color: var(--neutral-text-light);
  display: inline-block;
}

.footer-link:hover {
  color: var(--accent-gold);
  transform: translateX(5px);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  font-size: 0.95rem;
  color: var(--neutral-text-light);
}

.footer-contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent-gold);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: var(--space-xl) var(--space-xl);
  background: rgba(3, 7, 18, 0.5);
}

.footer-bottom-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--neutral-text-light);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-bottom-link:hover {
  color: var(--accent-gold);
}

/* --------------------------------------------------------------------------
   4. STICKY WHATSAPP CTA BUBBLE
   -------------------------------------------------------------------------- */
.whatsapp-cta {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: var(--z-sticky);
  background: #25D366;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  transition: var(--transition-normal);
  cursor: pointer;
}

.whatsapp-cta:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-cta svg {
  width: 32px;
  height: 32px;
  fill: var(--neutral-white);
}

.whatsapp-cta::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
  z-index: var(--z-negative);
  animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   5. LAYOUT & RESPONSIVE GRID UTILITIES
   -------------------------------------------------------------------------- */
.section {
  padding: var(--space-4xl) var(--space-xl);
  position: relative;
}

.section-alt {
  background-color: var(--neutral-white);
}

.container {
  max-width: 1300px;
  margin: 0 auto;
}

/* Section Titles styling */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}

.section-badge {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-emerald);
  display: inline-block;
  margin-bottom: var(--space-sm);
  padding: var(--space-xxs) var(--space-md);
  background: var(--primary-emerald-light);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-emerald);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  color: var(--neutral-text-gray);
  font-size: 1.15rem;
}

/* Split content layout grid */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-2xl);
  }
  .footer-top > div:last-child {
    grid-column: span 3;
  }
}

/* Specific laptop navigation adjustments to prevent premature wrapping */
@media (min-width: 1151px) and (max-width: 1440px) {
  .nav-menu {
    gap: var(--space-md) !important;
  }
  .nav-link {
    font-size: 0.88rem !important;
  }
  .header-container {
    padding: 0.4rem var(--space-md) !important;
  }
}

@media (max-width: 1150px) {
  .hamburger {
    display: block;
  }
  .nav-menu, .nav-actions {
    display: none;
  }
  .split-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}

@media (max-width: 600px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.85rem; }
  .section {
    padding: var(--space-2xl) var(--space-md);
  }
  .header-wrapper {
    padding: var(--space-md) var(--space-md);
  }
  .header-wrapper.scrolled {
    padding: var(--space-xs) var(--space-md);
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .footer-top > div:last-child {
    grid-column: span 1;
  }
  .footer-bottom-container {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
  .whatsapp-cta {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .whatsapp-cta svg {
    width: 26px;
    height: 26px;
  }
}

/* --------------------------------------------------------------------------
   6. STICKY B2B FLOATING LEAD-GEN CTA
   -------------------------------------------------------------------------- */
.sticky-lead-cta {
  position: fixed;
  bottom: 30px;
  right: 110px; /* Offset from the WhatsApp bubble which sits at right: 30px */
  z-index: var(--z-sticky);
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--border-gold-subtle);
  border-radius: var(--radius-lg);
  padding: 0.65rem var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-xl);
  transform: translateY(150px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.sticky-lead-cta.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-lead-text {
  color: var(--neutral-white);
  font-weight: 600;
  font-size: 0.92rem;
}

.sticky-lead-btn {
  background: var(--accent-gold);
  color: var(--secondary-navy-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sticky-lead-btn:hover {
  background: var(--neutral-white);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .sticky-lead-cta {
    right: 0;
    left: 0;
    bottom: 0;
    border-radius: 0;
    border-top: var(--border-gold-subtle);
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: var(--space-sm) var(--space-md);
    justify-content: space-between;
    width: 100%;
    transform: translateY(100px);
  }
  
  .whatsapp-cta {
    bottom: 75px !important;
    right: 20px !important;
  }
}
