/* ================================================
   Advertys Landing Page — Custom Styles
   Complements Tailwind CSS (loaded via CDN)
   ================================================ */

/* --- Base ------------------------------------------------ */
html, body {
  overflow-x: hidden;
}
html {
  font-size: 17px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Subtle film-grain overlay for depth */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  background: repeating-conic-gradient(#000 0.0001%, transparent 0.0002%) 50% 50% / 2500px 2500px;
  mix-blend-mode: overlay;
}

/* --- Custom Scrollbar ------------------------------------ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #1A1A2E; }
::-webkit-scrollbar-thumb { background: #177FBF; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #F2B33D; }

/* --- Selection ------------------------------------------- */
::selection {
  background: rgba(242, 179, 61, 0.25);
  color: #1A1A2E;
}

/* --- Scroll Reveal Animations ---------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }
.reveal-delay-7 { transition-delay: 0.56s; }
.reveal-delay-8 { transition-delay: 0.64s; }

/* --- Hero Keyframes -------------------------------------- */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%      { transform: translateY(-14px) rotate(0.8deg); }
  66%      { transform: translateY(-6px) rotate(-0.8deg); }
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(12px, -14px) scale(1.03); }
  50%  { transform: translate(-6px, -22px) scale(0.98); }
  75%  { transform: translate(-16px, -6px) scale(1.01); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.hero-animate {
  animation: heroIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}
.hero-delay-1 { animation-delay: 0.15s; }
.hero-delay-2 { animation-delay: 0.3s; }
.hero-delay-3 { animation-delay: 0.45s; }
.hero-delay-4 { animation-delay: 0.6s; }

/* --- Floating Background Shapes -------------------------- */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: drift 22s ease-in-out infinite;
  will-change: transform;
}

/* --- Navbar ---------------------------------------------- */
#navbar {
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.navbar-scrolled {
  background: rgba(26, 26, 46, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
}

/* --- Browser Mockup -------------------------------------- */
.browser-mockup {
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 32px 64px -16px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: float 7s ease-in-out infinite;
}
.browser-bar {
  height: 34px;
  background: linear-gradient(180deg, #38384e, #2b2b40);
  display: flex;
  align-items: center;
  padding: 0 13px;
  gap: 7px;
}
.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- Screenshot Images ----------------------------------- */
.screenshot-img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: top left;
  background: #f8f9fa;
}

/* --- Feature Cards --------------------------------------- */
.feature-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -12px rgba(23, 127, 191, 0.14);
}

/* --- Tab System ------------------------------------------ */
.tab-btn {
  position: relative;
  transition: color 0.3s ease;
  cursor: pointer;
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 3px;
  background: #F2B33D;
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.tab-btn.active::after {
  width: 100%;
}
.tab-panel {
  display: none !important;
  animation: fadeTab 0.45s ease forwards;
}
.tab-panel.active {
  display: grid !important;
}
@keyframes fadeTab {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- FAQ Accordion --------------------------------------- */
.faq-item {
  border-bottom: 1px solid rgba(23, 127, 191, 0.1);
}
.faq-toggle {
  cursor: pointer;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.35s ease;
}
.faq-answer.open {
  max-height: 320px;
}
.faq-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq-icon.open {
  transform: rotate(45deg);
}

/* --- Mobile Menu ----------------------------------------- */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* --- CTA Button Shimmer ---------------------------------- */
.btn-shimmer {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.btn-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.6s ease;
}
.btn-shimmer:hover::after {
  left: 120%;
}

/* --- Gradient Text --------------------------------------- */
.gradient-text {
  background: linear-gradient(135deg, #F2B33D 0%, #F5C564 40%, #FFD98E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Dot Pattern Background ------------------------------ */
.dot-pattern {
  background-image: radial-gradient(circle, rgba(23, 127, 191, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* --- Glass Card ------------------------------------------ */
.glass-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- Decorative Line ------------------------------------- */
.deco-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #F2B33D, #177FBF);
  border-radius: 2px;
}

/* --- AI Section ------------------------------------------ */
.ai-section {
  /* Section already uses Tailwind bg, this adds the grid */
}
.ai-grid-bg {
  background-image:
    linear-gradient(rgba(23, 127, 191, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 127, 191, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.ai-feature-number {
  font-family: 'Sora', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, rgba(242, 179, 61, 0.25) 0%, rgba(242, 179, 61, 0.05) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}
.ai-mockup-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s ease;
}
.ai-mockup-card:hover {
  border-color: rgba(242, 179, 61, 0.15);
}
.ai-suggestion-chip {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  cursor: default;
  transition: all 0.25s ease;
}
.ai-suggestion-chip:hover {
  color: #F2B33D;
  border-color: rgba(242, 179, 61, 0.3);
  background: rgba(242, 179, 61, 0.08);
}

/* AI badge pulse */
.ai-badge {
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 179, 61, 0.15); }
  50%      { box-shadow: 0 0 0 6px rgba(242, 179, 61, 0); }
}

/* AI typing indicator */
.ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(242, 179, 61, 0.5);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

/* --- Product Cards --------------------------------------- */
.product-card {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease;
}
.product-card:hover {
  transform: translateY(-8px);
}

/* Product pill hover in hero */
.product-pill {
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-pill:hover {
  transform: translateY(-2px);
}

/* --- Client Logos ---------------------------------------- */
.client-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 60px;
  padding: 8px;
}
.client-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.5);
  transition: filter 0.4s ease, transform 0.4s ease;
}
.client-logo-wrap:hover .client-logo {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.08);
}

/* --- CRM Screenshot Frames ------------------------------- */
.crm-screenshot-frame {
  background: #1a1a2e;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.6s ease;
}
.crm-screenshot-frame:hover {
  transform: translateY(-4px);
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.5),
    0 0 40px -10px rgba(23, 127, 191, 0.08);
}
.crm-screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
  /* Force crisp rendering for high-DPI screenshots */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* --- Responsive Overrides -------------------------------- */
@media (max-width: 768px) {
  .browser-mockup {
    animation: none;
  }
  .floating-shape {
    display: none;
  }
  /* AI section — prevent horizontal overflow */
  .ai-feature-row {
    gap: 1.5rem;
  }
  .ai-feature-row > * {
    min-width: 0;
    overflow: hidden;
  }
  .ai-mockup-card {
    padding: 1rem 1.25rem;
  }
  /* Module mockup images — fit nicely on small screens */
  #modulos .tab-panel img {
    max-width: 100%;
    height: auto;
  }
  /* General breathing room */
  .ai-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  .ai-section .mb-24 {
    margin-bottom: 3rem;
  }
  .ai-section .mb-20 {
    margin-bottom: 2.5rem;
  }
}

/* --- Integration Cards ----------------------------------- */
.integration-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    background 0.4s ease;
  cursor: default;
}
.integration-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(242, 179, 61, 0.25);
  box-shadow:
    0 16px 48px -8px rgba(0, 0, 0, 0.3),
    0 0 24px -4px rgba(242, 179, 61, 0.08);
}
.integration-card .int-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.35s ease;
}
.integration-card:hover .int-icon {
  background: rgba(242, 179, 61, 0.1);
}
.integration-card .int-icon img {
  max-width: 36px;
  max-height: 36px;
  object-fit: contain;
}
.integration-card .int-icon svg {
  width: 28px;
  height: 28px;
}
.integration-card .int-name {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.01em;
}
.integration-category-label {
  font-family: 'Sora', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 179, 61, 0.6);
}
/* Connecting dots background for integrations */
.integrations-dots-bg {
  background-image:
    radial-gradient(circle, rgba(23, 127, 191, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

/* --- Hamburger Animation --------------------------------- */
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
