*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto; /* Managed by Lenis smooth scroll */
  overflow-x: hidden;
  max-width: 100%;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  selection-background-color: var(--gold-300);
  selection-color: var(--navy-900);
}

::selection {
  background: var(--gold-400);
  color: var(--navy-950);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-500);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-600);
}

/* Scroll Progress Bar at the top */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gold-gradient);
  z-index: 9999;
  box-shadow: 0 0 10px rgba(201, 162, 74, 0.8);
  pointer-events: none;
}

/* Custom Cursor (Mouse Follow) */
.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--gold-500);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, opacity 0.3s ease;
}

.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--gold-500);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.15s ease-out;
  box-shadow: 0 0 15px rgba(201, 162, 74, 0.2);
}

body.cursor-hover .custom-cursor-ring {
  width: 60px;
  height: 60px;
  background: rgba(201, 162, 74, 0.12);
  border-color: var(--gold-400);
  backdrop-filter: blur(2px);
}

body.cursor-hover .custom-cursor-dot {
  transform: translate(-50%, -50%) scale(1.6);
  background: var(--gold-300);
}

@media (pointer: coarse) {
  .custom-cursor-dot, .custom-cursor-ring {
    display: none !important;
  }
}

/* Preloader Animation */
.site-preloader {
  position: fixed;
  inset: 0;
  background: var(--navy-950);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 1.1s var(--ease-out-expo), opacity 0.8s ease;
}

.site-preloader.loaded {
  transform: translateY(-100%);
  pointer-events: none;
}

.preloader-emblem {
  width: 140px;
  height: 140px;
  position: relative;
}

.preloader-emblem svg {
  width: 100%;
  height: 100%;
}

.preloader-text {
  margin-top: 24px;
  color: var(--gold-300);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-align: center;
}

.preloader-bar-wrap {
  width: 180px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 16px;
  border-radius: 2px;
  overflow: hidden;
}

.preloader-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--gold-gradient);
  transition: width 0.4s ease;
}

/* Typography styles */
h1, h2, h3, h4, .serif-font {
  font-family: var(--font-serif);
  color: var(--navy-800);
  line-height: 1.15;
  font-weight: 600;
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.text-gold {
  background: var(--gold-metallic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(201, 162, 74, 0.12);
  border: 1px solid rgba(201, 162, 74, 0.3);
  color: var(--gold-700);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.section-tag.on-dark {
  background: rgba(201, 162, 74, 0.18);
  border-color: rgba(201, 162, 74, 0.45);
  color: var(--gold-300);
}

.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

/* Magnetic Button Utility */
.magnetic-btn-wrap {
  display: inline-block;
  position: relative;
}

.btn-magnetic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 36px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.btn-gold {
  background: var(--gold-gradient);
  color: var(--navy-950);
  box-shadow: 0 10px 25px rgba(201, 162, 74, 0.35);
}

.btn-gold:hover {
  box-shadow: 0 14px 35px rgba(201, 162, 74, 0.55);
  transform: translateY(-2px);
}

.btn-gold::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: translateX(-100%) rotate(25deg);
  transition: transform 0.75s ease;
}

.btn-gold:hover::before {
  transform: translateX(100%) rotate(25deg);
}

.btn-outline-gold {
  background: transparent;
  color: var(--navy-700);
  border: 1.5px solid var(--gold-500);
}

.btn-outline-gold:hover {
  background: rgba(201, 162, 74, 0.1);
  border-color: var(--gold-600);
  color: var(--navy-900);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF !important;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  box-shadow: 0 14px 35px rgba(37, 211, 102, 0.55);
}

/* Floating WhatsApp Quick Action Button */
.floating-whatsapp-widget {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 12px;
}

.floating-whatsapp-bubble {
  background: #FFFFFF;
  padding: 10px 18px;
  border-radius: 20px;
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy-900);
  border: 1px solid rgba(201, 162, 74, 0.25);
  white-space: nowrap;
  animation: floatSubtle 4s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.floating-whatsapp-widget:hover .floating-whatsapp-bubble,
.floating-whatsapp-bubble.show-bubble {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.floating-whatsapp-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.3s var(--ease-elastic), box-shadow 0.3s ease;
  position: relative;
}

.floating-whatsapp-btn::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.6);
  animation: pulseRipple 2.2s infinite;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 14px 40px rgba(37, 211, 102, 0.65);
}

@keyframes pulseRipple {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.45); opacity: 0; }
}

@keyframes floatSubtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}


@media (max-width: 768px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .floating-whatsapp-widget {
    bottom: 16px;
    right: 16px;
    left: 16px;
    justify-content: flex-end;
    gap: 10px;
  }

  .floating-whatsapp-bubble {
    white-space: normal;
    max-width: calc(100vw - 98px);
    font-size: 0.78rem;
    padding: 8px 14px;
    line-height: 1.35;
  }

  .floating-whatsapp-btn {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
  }
}
