:root {
  --bg-dark: #0B0B0B;
  --bg-card: #121217;
  --bg-card-hover: #181820;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(124, 58, 237, 0.4);
  --brand-indigo: #4F46E5;
  --brand-violet: #7C3AED;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: #FFFFFF;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Sora', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0B0B0B;
}
::-webkit-scrollbar-thumb {
  background: #27273A;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4F46E5;
}

/* Glowing Background Gradients */
.bg-hero-glow {
  background: radial-gradient(circle at 50% 20%, rgba(79, 70, 229, 0.18) 0%, rgba(124, 58, 237, 0.12) 35%, rgba(11, 11, 11, 0) 70%);
}

.bg-cta-glow {
  background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.25) 0%, rgba(79, 70, 229, 0.1) 50%, rgba(11, 11, 11, 0) 80%);
}

.grid-bg-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Glassmorphism */
.glass-panel {
  background: rgba(18, 18, 23, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
}

.glass-nav {
  background: rgba(11, 11, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-card {
  background: linear-gradient(180deg, rgba(22, 22, 30, 0.8) 0%, rgba(14, 14, 19, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(124, 58, 237, 0.25);
}

/* Gradient Text & Borders */
.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 30%, #A5B4FC 60%, #C084FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-brand {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #C084FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-gradient {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: all 0.6s ease;
}

.btn-gradient:hover::before {
  left: 100%;
}

.btn-gradient:hover {
  box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.5);
  transform: translateY(-2px);
}

/* Badge styling */
.badge-tech {
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #C084FC;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-float-slow {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 7s ease-in-out 2s infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

.animate-slide-up {
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scroll reveal utility */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Portfolio Item Visiblity & Overlay */
.portfolio-overlay {
  background: linear-gradient(0deg, rgba(11, 11, 11, 0.96) 0%, rgba(11, 11, 11, 0.75) 65%, rgba(11, 11, 11, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay,
.portfolio-card.touch-active .portfolio-overlay {
  opacity: 1;
}

/* Permanent Visibility on Small Screens for Mobile UX */
@media (max-width: 768px) {
  .portfolio-overlay {
    opacity: 1;
    background: linear-gradient(0deg, rgba(11, 11, 11, 0.95) 0%, rgba(11, 11, 11, 0.85) 80%, rgba(11, 11, 11, 0.5) 100%);
  }
}

.portfolio-card:hover img {
  transform: scale(1.05);
}

/* Timeline dot pulse */
.timeline-dot {
  position: relative;
}
.timeline-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.4);
  z-index: -1;
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Interactive Hero Tab Buttons */
.hero-tab-btn {
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-tab-btn.active {
  background: rgba(124, 58, 237, 0.25);
  border-color: rgba(124, 58, 237, 0.6);
  color: #FFFFFF;
}

/* Multi-Step Quiz Card Selection Buttons */
.quiz-option-card {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.quiz-option-card:hover {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.08);
}

.quiz-option-card.selected {
  border-color: #7C3AED;
  background: rgba(124, 58, 237, 0.2);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.35);
}

/* Magnetic Button Hover Effect */
.btn-magnetic {
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Sticky Lead Bar Mobile */
#mobile-sticky-cta {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ==========================================
   3D GUARANTEE CARDS — MOBILE FIRST
=========================================== */

/* Base card styles */
.guarantee-card {
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(22, 22, 32, 0.96) 0%, rgba(12, 12, 18, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

/* ─── MOBILE (< 768px): Simples, vertical, sem leque ─── */
@media (max-width: 767px) {
  .deck-wrapper {
    cursor: default !important;
    height: auto !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    perspective: none !important;
  }

  /* Ocultar hint de clique no mobile */
  #deck-hint {
    display: none !important;
  }

  .guarantee-card {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    top: auto !important;
    margin-left: 0 !important;
    transform: none !important;
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.6) !important;
    border-radius: 1.25rem !important;
  }

  .guarantee-card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(124, 58, 237, 0.45) !important;
    box-shadow: 0 16px 32px -8px rgba(124, 58, 237, 0.25) !important;
  }
}

/* ─── TABLET (768px–1023px): Leque 3D + expansão side-by-side ─── */
@media (min-width: 768px) and (max-width: 1023px) {
  .deck-wrapper {
    perspective: 1000px;
    position: relative;
    height: 430px;
    max-width: 700px;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .guarantee-card {
    position: absolute !important;
    width: 300px !important;
    left: 50% !important;
    top: 20px !important;
    margin-left: -150px !important;
    transition: all 0.55s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transform-origin: center 120% !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 30px rgba(124, 58, 237, 0.2) !important;
    border-radius: 1.25rem !important;
  }

  /* Stacked fan */
  .deck-stacked .g-card-1 { transform: rotate(-14deg) translateX(-60px) translateY(10px) !important; z-index: 10 !important; }
  .deck-stacked .g-card-2 { transform: rotate(0deg) translateY(-8px) !important; z-index: 20 !important; }
  .deck-stacked .g-card-3 { transform: rotate(14deg) translateX(60px) translateY(10px) !important; z-index: 30 !important; }

  .deck-stacked:hover .g-card-1 { transform: rotate(-18deg) translateX(-80px) translateY(5px) !important; }
  .deck-stacked:hover .g-card-2 { transform: rotate(0deg) translateY(-20px) !important; }
  .deck-stacked:hover .g-card-3 { transform: rotate(18deg) translateX(80px) translateY(5px) !important; }

  /* Expanded: height auto + side-by-side via flex */
  .deck-wrapper.deck-expanded {
    height: auto !important;
    max-width: 700px !important;
    display: flex !important;
    gap: 1rem !important;
    align-items: flex-start !important;
    perspective: none !important;
  }

  .deck-expanded .guarantee-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin-left: 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    flex: 1 1 0 !important;
    transform: none !important;
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6) !important;
  }

  .deck-expanded .guarantee-card:hover {
    transform: translateY(-6px) scale(1.02) !important;
    border-color: rgba(124, 58, 237, 0.5) !important;
    box-shadow: 0 20px 40px -10px rgba(124, 58, 237, 0.3) !important;
  }
}

/* ─── DESKTOP (>= 1024px): Leque 3D completo + expansão lateral ─── */
@media (min-width: 1024px) {
  .deck-wrapper {
    perspective: 1200px;
    position: relative;
    height: 480px;
    max-width: 1200px;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .guarantee-card {
    position: absolute !important;
    width: 350px !important;
    left: 50% !important;
    top: 20px !important;
    margin-left: -175px !important;
    transition: all 0.55s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transform-origin: center 130% !important;
    box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.9), 0 0 35px rgba(124, 58, 237, 0.25) !important;
    border-radius: 1.5rem !important;
  }

  /* Stacked fan */
  .deck-stacked .g-card-1 { transform: rotate(-14deg) translateX(-70px) translateY(10px) !important; z-index: 10 !important; }
  .deck-stacked .g-card-2 { transform: rotate(0deg) translateY(-10px) !important; z-index: 20 !important; }
  .deck-stacked .g-card-3 { transform: rotate(14deg) translateX(70px) translateY(10px) !important; z-index: 30 !important; }

  .deck-stacked:hover .g-card-1 { transform: rotate(-20deg) translateX(-95px) translateY(5px) !important; }
  .deck-stacked:hover .g-card-2 { transform: rotate(0deg) translateY(-25px) !important; }
  .deck-stacked:hover .g-card-3 { transform: rotate(20deg) translateX(95px) translateY(5px) !important; }

  /* Expanded: lateral slide */
  .deck-expanded .g-card-1 { transform: rotate(0deg) translateX(-390px) translateY(0px) !important; z-index: 10 !important; }
  .deck-expanded .g-card-2 { transform: rotate(0deg) translateX(0px) translateY(0px) !important; z-index: 20 !important; }
  .deck-expanded .g-card-3 { transform: rotate(0deg) translateX(390px) translateY(0px) !important; z-index: 30 !important; }

  /* Stable hover — mantém o translateX de cada carta */
  .deck-expanded .g-card-1:hover { transform: rotate(0deg) translateX(-390px) translateY(-10px) scale(1.03) !important; z-index: 40 !important; border-color: rgba(124, 58, 237, 0.6) !important; box-shadow: 0 25px 50px -12px rgba(124, 58, 237, 0.4) !important; }
  .deck-expanded .g-card-2:hover { transform: rotate(0deg) translateX(0px) translateY(-10px) scale(1.03) !important; z-index: 40 !important; border-color: rgba(124, 58, 237, 0.6) !important; box-shadow: 0 25px 50px -12px rgba(124, 58, 237, 0.4) !important; }
  .deck-expanded .g-card-3:hover { transform: rotate(0deg) translateX(390px) translateY(-10px) scale(1.03) !important; z-index: 40 !important; border-color: rgba(124, 58, 237, 0.6) !important; box-shadow: 0 25px 50px -12px rgba(124, 58, 237, 0.4) !important; }
}
