/* ==========================================================================
   GSCHAT Condomínios — Custom Styles, Glassmorphism & Micro-interactions
   Domain: https://site.gschat.com.br
   ========================================================================== */

:root {
  --navy-950: #090f1d;
  --navy-900: #0f172a;
  --royal-700: #1d4ed8;
  --royal-600: #2563eb;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --surface-light: #f8fafc;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #0f172a;
  background-color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Header Glassmorphism */
.glass-header {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.glass-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.12);
  border-bottom-color: rgba(226, 232, 240, 0.9);
}

/* Hero Background Grid & Glow */
.hero-surface {
  background:
    radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.22) 0%, transparent 42%),
    radial-gradient(circle at 86% 24%, rgba(16, 185, 129, 0.14) 0%, transparent 38%),
    radial-gradient(circle at 75% 85%, rgba(29, 78, 216, 0.18) 0%, transparent 45%),
    linear-gradient(180deg, #0b1224 0%, #0f172a 60%, #111c36 100%);
}

.hero-grid-pattern {
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 55%, transparent 100%);
}

/* Glass Cards */
.glass-dark {
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.glass-light {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

/* Realistic WhatsApp Preview Surface */
.wa-chat-bg {
  background-color: #ece5dd;
  background-image: radial-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 16px 16px;
}

.wa-bubble {
  position: relative;
  border-radius: 0.75rem;
  border-top-left-radius: 0.2rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.wa-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: -7px;
  width: 10px;
  height: 12px;
  background: #ffffff;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.wa-bubble-outgoing {
  position: relative;
  border-radius: 0.75rem;
  border-top-right-radius: 0.2rem;
  background-color: #d9fdd3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.wa-bubble-outgoing::before {
  content: "";
  position: absolute;
  top: 0;
  right: -7px;
  width: 10px;
  height: 12px;
  background: #d9fdd3;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* Interactive Tabs & Cards */
.module-tab-btn {
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.module-tab-btn[aria-selected="true"] {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 12px 28px -8px rgba(37, 99, 235, 0.45);
}

.module-tab-btn[aria-selected="true"] .tab-icon-wrap {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.module-tab-btn[aria-selected="true"] .tab-subtext {
  color: rgba(219, 234, 254, 0.92);
}

.module-panel {
  animation: fadeSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hero Preview Switcher Pills */
.hero-demo-item {
  transition: all 0.2s ease;
}

.hero-demo-item.is-active {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.2);
}

/* Hover Lift Micro-interactions */
.card-hover {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -18px rgba(15, 23, 42, 0.16);
  border-color: rgba(37, 99, 235, 0.32);
}

.btn-primary-glow {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(37, 99, 235, 0.55);
}

.btn-emerald-glow {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-emerald-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(16, 185, 129, 0.55);
}

/* FAQ Accordion Smooth Transition */
.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.is-open .faq-content {
  grid-template-rows: 1fr;
}

.faq-inner {
  overflow: hidden;
}

.faq-chevron {
  transition: transform 0.25s ease;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pulse Ring for Live WhatsApp Indicator */
@keyframes pulseRing {
  0% {
    transform: scale(0.9);
    opacity: 0.85;
  }
  70% {
    transform: scale(2);
    opacity: 0;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.live-dot {
  position: relative;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-color: #10b981;
  animation: pulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes waPop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wa-animate-in {
  animation: waPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Focus Visibility for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .live-dot::after,
  .module-panel,
  .wa-animate-in {
    animation: none;
  }
}
