/* ==========================================================================
   Imobi Premium - Sistema de Design & Paleta de Cores Mercuri Digitalmed
   Estilo Visual: Kivo360 (SaaS Premium, Bento Grids, Tech-Grid, Glassmorphism)
   Paleta: Mercuri Digitalmed (Oklch Midnight Navy, Electric Cyan, Champagne Gold)
   Arquivo: assets/css/custom.css
   ========================================================================== */

:root {
  /* Fontes */
  --font-sans: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-heading: 'Poppins', system-ui, -apple-system, sans-serif;

  /* Cores com Fallbacks Hex para Compatibilidade Total */
  --background-fallback: #080d1a;
  --foreground-fallback: #f8fafc;
  --card-fallback: #11182c;
  --primary-fallback: #22d3ee;
  --gold-fallback: #f3ba4f;

  /* Paleta Oficial Mercuri Digitalmed (OKLCH) */
  --background: oklch(17% 0.035 262);        /* #080d1a - Midnight Navy Profundo */
  --foreground: oklch(97% 0.005 250);        /* #f8fafc - Branco Suave */
  --card: oklch(21.5% 0.034 262);            /* #11182c - Superfície de Card */
  --card-foreground: oklch(97% 0.005 250);
  --popover: oklch(20% 0.036 262);
  --popover-foreground: oklch(97% 0.005 250);

  /* Cor Primária Mercuri: Ciano Elétrico / Aqua-Teal */
  --primary: oklch(78% 0.15 205);            /* #22d3ee */
  --primary-rgb: 34, 211, 238;
  --primary-foreground: oklch(16% 0.04 250); /* #06131f */

  /* Cor Secundária & Bordas */
  --secondary: oklch(25.5% 0.036 262);      /* #162038 */
  --secondary-foreground: oklch(97% 0.005 250);
  --muted: oklch(25% 0.032 262);
  --muted-foreground: oklch(75.5% 0.022 258); /* #94a3b8 */
  --accent: oklch(30% 0.05 250);
  --accent-foreground: oklch(97% 0.005 250);

  /* Destaque Dourado Mercuri */
  --gold: oklch(82% 0.13 78);                /* #f3ba4f */
  --gold-foreground: oklch(20% 0.04 60);

  /* Superfície, Tinta e Bordas Refinadas */
  --ink: oklch(24.5% 0.075 254);
  --border: oklch(35% 0.035 258 / 0.45);    /* Borda sutil translúcida */
  --radius: 0.875rem;                        /* 14px */

  /* Efeitos de Luz Ambiente & Linhas Gradientes Mercuri */
  --ambient-light: radial-gradient(110% 90% at 78% -10%, color-mix(in oklab, var(--primary) 14%, transparent) 0%, transparent 58%), 
                   radial-gradient(80% 70% at 0% 108%, color-mix(in oklab, var(--ink) 70%, transparent) 0%, transparent 62%);
  --gradient-line: linear-gradient(90deg, transparent, color-mix(in oklab, var(--primary) 50%, transparent), transparent);
  --gradient-gold-line: linear-gradient(90deg, transparent, color-mix(in oklab, var(--gold) 60%, transparent), transparent);
  --shadow-glow: 0 1px 0 0 color-mix(in oklab, var(--primary) 25%, transparent), 0 20px 46px -24px color-mix(in oklab, var(--primary) 45%, transparent);
  --shadow-gold-glow: 0 1px 0 0 color-mix(in oklab, var(--gold) 25%, transparent), 0 20px 46px -24px color-mix(in oklab, var(--gold) 45%, transparent);
}

/* --------------------------------------------------------------------------
   2. Reset e Configurações Base
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  font-family: var(--font-sans);
  background-color: var(--background-fallback);
  background-color: var(--background);
  color: var(--foreground-fallback);
  color: var(--foreground);
  overflow-x: hidden;
  color-scheme: dark;
}

body {
  background-color: var(--background-fallback);
  background-color: var(--background);
  color: var(--foreground-fallback);
  color: var(--foreground);
  font-family: var(--font-sans);
  background-image: var(--ambient-light);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

.font-heading {
  font-family: var(--font-heading);
}

/* Foco Acessível com Destaque Ciano */
:focus-visible {
  outline: 2px solid var(--primary-fallback);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #080d1a;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Seleção de Texto */
::selection {
  background: rgba(34, 211, 238, 0.28);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. Padrões de Fundo Kivo360 & Mercuri (Tech-Grid, Dot Matrix)
   -------------------------------------------------------------------------- */
.tech-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 60%, transparent 100%);
}

.tech-grid-dots {
  background-image: radial-gradient(rgba(34, 211, 238, 0.18) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
}

/* Linha com gradiente de ponta a ponta Mercuri */
.gradient-divider {
  height: 1px;
  background: var(--gradient-line);
}

.gradient-gold-divider {
  height: 1px;
  background: var(--gradient-gold-line);
}

/* --------------------------------------------------------------------------
   4. Componentes com Acabamento Tailwind CSS / Tailwind UI
   -------------------------------------------------------------------------- */
/* Navbar Flutuante Estilo Tailwind UI */
.kivo-nav {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(51, 65, 85, 0.65);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  border-radius: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Cards Bento Grid Estilo Tailwind UI */
.bento-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(51, 65, 85, 0.55);
  border-radius: 0.875rem;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08), 0 12px 24px -8px rgba(0, 0, 0, 0.6), 0 0 20px -4px rgba(34, 211, 238, 0.18);
}

/* Card com Borda Dourada / Exclusividade */
.bento-card-gold {
  background: linear-gradient(145deg, rgba(243, 186, 79, 0.05) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(243, 186, 79, 0.35);
  box-shadow: inset 0 1px 0 0 rgba(243, 186, 79, 0.1), 0 1px 3px 0 rgba(0, 0, 0, 0.3);
}

.bento-card-gold:hover {
  border-color: rgba(243, 186, 79, 0.65);
  box-shadow: inset 0 1px 0 0 rgba(243, 186, 79, 0.15), 0 12px 24px -8px rgba(0, 0, 0, 0.6), 0 0 20px -4px rgba(243, 186, 79, 0.25);
}

/* Eyebrow Label / Editorial Index (Estilo Tailwind UI Badge) */
.editorial-index {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.editorial-index-gold {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ==========================================================================
   BOTÕES NO ESTILO TAILWIND CSS (Compactos, Precisos, Modernos)
   ========================================================================== */

/* Botão Primário Tailwind (Ciano Elétrico Mercuri - Menor e Refinado) */
.btn-mercuri-primary {
  background-color: var(--primary);
  color: #041017;
  font-size: 0.875rem; /* 14px - text-sm */
  font-weight: 600;    /* font-semibold */
  padding: 0.5rem 1rem; /* py-2 px-4 */
  border-radius: 0.5rem; /* rounded-lg */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 0 12px -2px rgba(34, 211, 238, 0.35);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1.25rem;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-mercuri-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.2), 0 0 18px -2px rgba(34, 211, 238, 0.5);
}

.btn-mercuri-primary:active {
  transform: translateY(0);
}

/* Botão Secundário Tailwind (Slate com Borda Delicada e Efeito Foco) */
.btn-kivo-outline {
  background: rgba(15, 23, 42, 0.75);
  color: #f1f5f9;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(51, 65, 85, 0.75);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1.25rem;
  white-space: nowrap;
}

.btn-kivo-outline:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(100, 116, 139, 0.85);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-kivo-outline:active {
  transform: translateY(0);
}

/* Botão Dourado Tailwind (Toque de Prestígio Imobiliário) */
.btn-mercuri-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #d97706 100%);
  color: #0b1021;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 0 12px -2px rgba(243, 186, 79, 0.35);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1.25rem;
  border: 1px solid transparent;
}

.btn-mercuri-gold:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.2), 0 0 18px -2px rgba(243, 186, 79, 0.5);
}

.btn-mercuri-gold:active {
  transform: translateY(0);
}

/* Textos com Gradiente Mercuri */
.text-gradient-cyan {
  background: linear-gradient(135deg, #a5f3fc 0%, #22d3ee 55%, #0891b2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #fef08a 0%, #f3ba4f 55%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-silver {
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 80%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   5. Spotlight Seguidor de Mouse nos Cards
   -------------------------------------------------------------------------- */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, -1000px);
  left: var(--mouse-x, -1000px);
  width: 380px;
  height: 380px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

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

/* --------------------------------------------------------------------------
   6. Mockups de Dispositivos com Acabamento Kivo360
   -------------------------------------------------------------------------- */
.device-laptop {
  position: relative;
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
}

.device-laptop-screen {
  background: #080d1a;
  border-radius: 14px 14px 0 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.9), 0 0 50px -15px rgba(34, 211, 238, 0.25);
  overflow: hidden;
}

.device-laptop-base {
  height: 14px;
  background: linear-gradient(180deg, #334155 0%, #0f172a 100%);
  border-radius: 0 0 12px 12px;
  position: relative;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.device-laptop-base::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 85px;
  height: 4px;
  background: #080d1a;
  border-radius: 0 0 4px 4px;
}

.device-tablet {
  width: 290px;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: #080d1a;
  padding: 7px;
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.85), 0 0 35px -10px rgba(34, 211, 238, 0.2);
}

.device-phone {
  max-width: 220px;
  width: 100%;
  border-radius: 30px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  background: #080d1a;
  padding: 8px;
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.9), 0 0 40px -10px rgba(243, 186, 79, 0.25);
  position: relative;
}

.device-phone-notch {
  width: 60px;
  height: 13px;
  background: #050811;
  border-radius: 8px;
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

/* --------------------------------------------------------------------------
   7. Abas da Seção Demonstração & Acordeom FAQ
   -------------------------------------------------------------------------- */
.demo-tab-btn.active {
  background: rgba(34, 211, 238, 0.14);
  border-color: var(--primary-fallback);
  border-color: var(--primary);
  color: var(--primary-fallback);
  color: var(--primary);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.25);
}

.demo-view-panel {
  display: none;
  animation: kivoFadeIn 0.35s ease forwards;
}

.demo-view-panel.active {
  display: block;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease, padding 0.3s ease;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.faq-item.active .faq-answer {
  max-height: 280px;
  opacity: 1;
  padding-bottom: 1rem;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary-fallback);
  color: var(--primary);
}

.faq-item.active {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(255, 255, 255, 0.035);
}
