/* Prevent FOUC (Flash of Unstyled Content) on page load animations */
.js-loading header,
.js-loading #hero .eyebrow,
.js-loading .hero-title,
.js-loading .hero-description,
.js-loading .hero-ctas .btn-primary,
.js-loading .hero-ctas .btn-ghost,
.js-loading .hero-visual,
.js-loading .hero-notification-card {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ==========================================================================
   Stavo Digital - Design Tokens (tokens.css)
   ========================================================================== */

@font-face {
  font-family: 'Urbanist';
  src: url('../../Urbanist-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Urbanist';
  src: url('../../Urbanist-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Urbanist';
  src: url('../../Urbanist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colors */
  --color-bg: #0A0A0A;
  --color-bg-2: #0D0D0D;
  --color-bg-card: rgba(255, 255, 255, 0.03);
  --color-gold: #C9A227;
  --color-gold-light: #F0C040;
  --color-gold-muted: rgba(201, 162, 39, 0.15);
  --color-text-primary: #FFFFFF;
  --color-text-secondary: rgba(255, 255, 255, 0.65);
  --color-text-muted: rgba(255, 255, 255, 0.4);
  --color-border: rgba(201, 162, 39, 0.15);
  --color-border-hover: rgba(201, 162, 39, 0.5);

  /* Typography */
  --font-display: 'Urbanist', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* Font sizes (fluid via clamp) */
  --text-hero: clamp(2rem, 4.5vw, 3.4rem);
  --text-h2: clamp(1.6rem, 3vw, 2.4rem);
  --text-h3: clamp(1.2rem, 2vw, 1.6rem);
  --text-body: clamp(0.9rem, 1.5vw, 1.0625rem);
  --text-small: clamp(0.8rem, 1.2vw, 0.875rem);

  /* Spacing (fluid) */
  --section-padding: clamp(80px, 10vw, 140px);
  --container-max: 1200px;
  --container-padding: clamp(20px, 5vw, 80px);

  /* Borders & Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-gold: 0 0 40px rgba(201, 162, 39, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index scale */
  --z-base: 1;
  --z-overlay: 10;
  --z-modal: 100;
  --z-nav: 1000;
  --z-toast: 9999;
}

/* ==========================================================================
   Stavo Digital - Normalization Reset (reset.css)
   ========================================================================== */

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

html {
  scroll-behavior: auto; /* Disabled for Lenis to handle custom smooth scroll */
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  touch-action: pan-y; /* Allow vertical swipe, prevent default zoom gestures */
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
  color: inherit;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

iframe {
  border: none;
}

:focus-visible {
  outline: 2px solid var(--color-gold, #C9A227);
  outline-offset: 4px;
}

/* ==========================================================================
   Stavo Digital - Global Base & Custom Cursor (base.css)
   ========================================================================== */

#cursor-dot {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ffffff;
  pointer-events: none;
  z-index: 99999;
  will-change: transform;
  transform: translate3d(-50%, -50%, 0);
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease;
}

#cursor-ring {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #C9A227;
  background-color: transparent;
  pointer-events: none;
  z-index: 99998;
  will-change: transform;
  transform: translate3d(-50%, -50%, 0);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    border-width 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  html,
  html * {
    cursor: none !important;
  }
  #cursor-dot,
  #cursor-ring {
    display: block;
  }
}

#cursor-dot.is-hidden,
#cursor-ring.is-hidden {
  opacity: 0;
}

#cursor-dot.state-btn-primary {
  width: 10px;
  height: 10px;
  background-color: #000000;
  opacity: 1;
}

#cursor-ring.state-btn-primary {
  width: 52px;
  height: 52px;
  border-color: #ffffff;
  border-width: 1.5px;
  background-color: rgba(255, 255, 255, 0.15);
}

#cursor-dot.state-btn-ghost {
  width: 8px;
  height: 8px;
  background-color: #C9A227;
  opacity: 1;
}

#cursor-ring.state-btn-ghost {
  width: 48px;
  height: 48px;
  border-color: rgba(201, 162, 39, 0.80);
  border-width: 1.5px;
  background-color: rgba(201, 162, 39, 0.06);
}

#cursor-dot.state-link {
  background-color: #C9A227;
  width: 8px;
  height: 8px;
}

#cursor-ring.state-link {
  width: 40px;
  height: 40px;
  border-color: rgba(201, 162, 39, 0.5);
}

#cursor-dot.state-view {
  width: 0;
  height: 0;
  opacity: 0;
}

#cursor-ring.state-view {
  width: 72px;
  height: 72px;
  border-color: rgba(255, 255, 255, 0.6);
  border-width: 1px;
  background-color: rgba(255, 255, 255, 0.04);
}

#cursor-dot.state-drag {
  width: 0;
  height: 0;
  opacity: 0;
}

#cursor-ring.state-drag {
  width: 64px;
  height: 64px;
  border-color: #C9A227;
  background-color: rgba(201, 162, 39, 0.1);
}

#cursor-dot.state-text {
  width: 2px;
  height: 20px;
  border-radius: 1px;
  background-color: #C9A227;
}

#cursor-ring.state-text {
  opacity: 0;
  width: 0;
  height: 0;
}

#cursor-ring .cursor-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  user-select: none;
}

#cursor-ring.state-view .cursor-label,
#cursor-ring.state-drag .cursor-label {
  opacity: 1;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-size: var(--text-body);
  line-height: 1.7;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

h2+p,
.section-header h2+p {
  margin-top: 26px;
}

h3 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
}

h1 em,
h2 em,
h3 em,
.highlight {
  color: var(--color-gold);
  font-style: italic;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  display: inline-block;
  margin-bottom: 1.5rem;
}

p {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.text-muted {
  color: var(--color-text-muted);
}

section {
  position: relative;
  padding: var(--section-padding) 0;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(20px, 5vw, 40px);
  padding-right: clamp(20px, 5vw, 40px);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: none;
  background-color: transparent;
  pointer-events: none;
  z-index: 9999;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 10001;
}

.back-to-top {
  position: fixed;
  bottom: 7.25rem;
  right: calc(2rem + 6px);
  width: 48px;
  height: 48px;
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: border-color var(--transition-base), background-color var(--transition-base), transform var(--transition-base);
  box-shadow: var(--shadow-card);
}

.back-to-top:hover {
  border-color: var(--color-gold);
  background-color: var(--color-gold-muted);
  transform: translateY(-4px);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ==========================================================================
   WhatsApp Floating Button & Animated Tooltip Message
   ========================================================================== */

.whatsapp-float-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.whatsapp-float-container * {
  pointer-events: auto;
}

.whatsapp-btn {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 1px rgba(201, 162, 39, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  z-index: 10;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5), 0 0 0 2px rgba(201, 162, 39, 0.4);
}

.whatsapp-btn:active {
  transform: scale(0.95);
}

.whatsapp-icon {
  width: 30px;
  height: 30px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.whatsapp-btn:hover .whatsapp-icon {
  transform: rotate(8deg) scale(1.05);
}

.whatsapp-pulse-ring {
  position: absolute;
  inset: -4px;
  border: 2px solid #25D366;
  border-radius: 50%;
  opacity: 0;
  animation: whatsapp-pulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}

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

.whatsapp-message-bubble {
  position: absolute;
  right: 76px;
  bottom: 4px;
  width: 320px;
  background: rgba(13, 13, 13, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(201, 162, 39, 0.05);
  padding: 16px;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(30px, 10px, 0) scale(0.4);
  transform-origin: bottom right;
  transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              visibility 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5;
}

.whatsapp-message-bubble.is-active {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
}

/* Bubble speech tail for desktop */
.whatsapp-message-bubble::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(13, 13, 13, 0.90);
  border-right: 1px solid rgba(201, 162, 39, 0.2);
  border-top: 1px solid rgba(201, 162, 39, 0.2);
  pointer-events: none;
}

.whatsapp-bubble-content {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  width: 100%;
}

.whatsapp-author-avatar {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.whatsapp-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 10%;
  border: 1.5px solid var(--color-gold, #C9A227);
}

.whatsapp-online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background-color: #25D366;
  border: 2px solid #0d0d0d;
  border-radius: 50%;
  animation: indicator-pulse 2s infinite;
}

@keyframes indicator-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 5px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-bubble-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 14px;
}

.whatsapp-author-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.whatsapp-author-name {
  font-family: var(--font-display, 'Urbanist');
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.whatsapp-author-status {
  font-size: 0.7rem;
  color: #25D366;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.whatsapp-message-text {
  font-family: var(--font-body, 'DM Sans');
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  margin: 0;
}

.whatsapp-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s ease, background-color 0.2s ease;
  z-index: 12;
}

.whatsapp-close-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .whatsapp-float-container {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .back-to-top {
    bottom: 6.5rem;
    right: calc(1.5rem + 6px);
  }

  .whatsapp-message-bubble {
    bottom: 72px;
    right: 0;
    width: calc(100vw - 3rem);
    max-width: 310px;
    transform: translate3d(0, 30px, 0) scale(0.4);
    transform-origin: bottom right;
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                visibility 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .whatsapp-message-bubble.is-active {
    transform: translate3d(0, 0, 0) scale(1);
  }

  /* Bubble speech tail for mobile */
  .whatsapp-message-bubble::after {
    top: auto;
    bottom: -6px;
    right: 24px;
    transform: rotate(45deg);
    border-right: 1px solid rgba(201, 162, 39, 0.2);
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
    border-top: none;
    border-left: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gold);
  color: #000;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  z-index: 10002;
  font-weight: 700;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 10px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-delay: 0s !important;
    animation-duration: 0.1s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.1s !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Stavo Digital - Shared Components (components.css)
   ========================================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-gold);
  color: #000000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-gold);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-base), background-color var(--transition-base);
  position: relative;
  overflow: hidden;
  text-align: center;
  z-index: 1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
  z-index: -1;
}

.btn-primary:hover::after {
  transform: scaleX(1);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  color: var(--color-gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  padding: 13px 35px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(201, 162, 39, 0.4);
  cursor: pointer;
  transition: var(--transition-base), transform var(--transition-fast);
  text-align: center;
}

.btn-ghost:hover {
  border-color: var(--color-gold);
  background: rgba(201, 162, 39, 0.08);
}

.btn-ghost:active {
  transform: scale(0.97);
}

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: border-color var(--transition-base), background-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  border-color: var(--color-border-hover);
  background: rgba(201, 162, 39, 0.04);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.card:hover::before {
  opacity: 1;
}

.glow-bg {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: glow-pulse 6s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes glow-pulse {
  from {
    transform: scale(1) translate(0, 0);
    opacity: 0.7;
  }
  to {
    transform: scale(1.1) translate(20px, -20px);
    opacity: 1;
  }
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
  transform: scaleX(0);
  transform-origin: center;
  width: 100%;
}
