:root {
  --page-bg: #F8FAFC;
  --page-text: #3a3a3a;
  --page-muted: #6b7280;
  --page-surface: #f1f5f9;
  --page-surface-strong: rgba(255, 255, 255, 0.88);
  --page-border: #E2E8F0;
  --page-nav: rgba(248, 250, 252, 0.88);
  --page-glow: rgba(23, 63, 147, 0.12);
  --page-shadow: 0 2px 20px -6px rgba(23, 63, 147, 0.07);
  --page-accent: #173f93;
  --page-accent-soft: rgba(23, 63, 147, 0.08);
  --page-accent-strong: #a3b5d9;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--page-bg);
  color: var(--page-text);
  transition: background-color 220ms ease, color 220ms ease;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(55, 52, 53, 0.2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(55, 52, 53, 0.32);
}

[x-cloak] {
  display: none !important;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--page-accent);
  outline-offset: 2px;
}

.glass-panel {
  background: var(--page-surface-strong);
  border: 1px solid var(--page-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--page-shadow);
}

.glass-nav {
  background: var(--page-nav);
  border-bottom: 1px solid var(--page-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.text-gradient {
  background: linear-gradient(135deg, #173f93 0%, #4b6ec0 48%, #a3b5d9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-point {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, var(--page-glow) 0%, rgba(255, 255, 255, 0) 72%);
  filter: blur(2px);
}

/* ============================================================
   Button animations
   ============================================================ */

.hero-cta-primary,
.btn-primary {
  position: relative;
  overflow: hidden;
  transition:
    transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 280ms ease,
    background-color 200ms ease;
}

/* Shimmer sweep */
.hero-cta-primary::before,
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 48%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-18deg);
  transition: left 560ms ease;
  pointer-events: none;
}

.hero-cta-primary:hover::before,
.btn-primary:hover::before {
  left: 150%;
}

.hero-cta-primary:hover,
.btn-primary:hover {
  transform: scale(1.025) translateY(-1px);
  box-shadow: 0 8px 28px -8px rgba(255, 255, 255, 0.22), 0 2px 8px -2px rgba(0, 0, 0, 0.10);
}

.hero-cta-primary:active,
.btn-primary:active {
  transform: scale(0.97);
  transition-duration: 100ms;
}

.hero-cta-primary iconify-icon,
.btn-primary iconify-icon {
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
}

.hero-cta-primary:hover iconify-icon,
.btn-primary:hover iconify-icon {
  transform: translateX(3px);
}

/* --- Ghost / secondary --- */
.hero-cta-secondary,
.btn-ghost {
  position: relative;
  overflow: hidden;
  transition:
    transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 260ms ease,
    box-shadow 280ms ease,
    background-color 200ms ease;
}

.hero-cta-secondary::before,
.btn-ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, rgba(163, 181, 217, 0.13) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 360ms ease;
  pointer-events: none;
}

.hero-cta-secondary:hover::before,
.btn-ghost:hover::before {
  opacity: 1;
}

.hero-cta-secondary:hover,
.btn-ghost:hover {
  transform: scale(1.015) translateY(-1px);
  box-shadow: 0 0 22px -5px rgba(163, 181, 217, 0.28);
  border-color: rgba(163, 181, 217, 0.32) !important;
}

.hero-cta-secondary:active,
.btn-ghost:active {
  transform: scale(0.99);
  transition-duration: 100ms;
}

.hero-cta-secondary iconify-icon,
.btn-ghost iconify-icon {
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
}

.hero-cta-secondary:hover iconify-icon,
.btn-ghost:hover iconify-icon {
  transform: translateY(2px);
}

/* Light mode adjustments */
body.theme-light .hero-cta-secondary::before,
body.theme-light .btn-ghost::before {
  background: radial-gradient(ellipse at center, rgba(23, 63, 147, 0.06) 0%, transparent 70%);
}

body.theme-light .hero-cta-secondary:hover,
body.theme-light .btn-ghost:hover {
  box-shadow: 0 0 18px -5px rgba(23, 63, 147, 0.12);
  border-color: rgba(23, 63, 147, 0.20) !important;
}

/* --- WhatsApp FAB --- */
.btn-fab {
  position: relative;
  transition:
    transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 280ms ease;
}

.btn-fab::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  animation: fab-pulse 2.6s ease-in-out infinite;
  pointer-events: none;
}

.btn-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.30);
}

.btn-fab:active {
  transform: scale(0.95);
  transition-duration: 100ms;
}

@keyframes fab-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.55; }
  60%       { transform: scale(1.22); opacity: 0; }
}

.fade-in-up {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 650ms cubic-bezier(0.25, 1, 0.4, 1) forwards;
}

.delay-100 { animation-delay: 80ms; }
.delay-200 { animation-delay: 160ms; }
.delay-300 { animation-delay: 240ms; }
.delay-500 { animation-delay: 360ms; }

.reveal-item {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 560ms cubic-bezier(0.25, 1, 0.4, 1),
    transform 560ms cubic-bezier(0.25, 1, 0.4, 1);
  will-change: opacity, transform;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-item.is-hidden {
  opacity: 0;
  transform: translateY(14px);
  transition: none;
}

.reveal-item[data-reveal-delay="100"] { transition-delay: 80ms; }
.reveal-item[data-reveal-delay="200"] { transition-delay: 160ms; }
.reveal-item[data-reveal-delay="300"] { transition-delay: 240ms; }
.reveal-item[data-reveal-delay="500"] { transition-delay: 340ms; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero background orbs */
.hero-orb {
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
  will-change: transform;
}

.hero-orb-1 {
  width: 640px;
  height: 640px;
  top: -180px;
  left: -160px;
  background: radial-gradient(circle, rgba(23, 63, 147, 0.28) 0%, transparent 68%);
  filter: blur(48px);
  animation: orb-drift-1 20s ease-in-out infinite alternate;
}

.hero-orb-2 {
  width: 520px;
  height: 520px;
  bottom: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(163, 181, 217, 0.18) 0%, transparent 68%);
  filter: blur(56px);
  animation: orb-drift-2 26s ease-in-out infinite alternate;
}

.hero-orb-3 {
  width: 360px;
  height: 360px;
  top: 35%;
  right: 18%;
  background: radial-gradient(circle, rgba(23, 63, 147, 0.14) 0%, transparent 70%);
  filter: blur(40px);
  animation: orb-drift-3 18s ease-in-out infinite alternate;
}

@keyframes orb-drift-1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(72px, 56px) scale(1.08); }
}

@keyframes orb-drift-2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-56px, -72px) scale(1.12); }
}

@keyframes orb-drift-3 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(44px, -48px) scale(0.92); }
}

body.theme-light {
  color-scheme: light;
}

body.theme-light {
  background-color: var(--page-bg) !important;
  color: var(--page-text) !important;
  --page-text: #4d4d4d;
  --page-muted: #6b6b6b;
  --page-glow: rgba(23, 63, 147, 0.16);
  --page-accent: #173f93;
  --page-accent-soft: rgba(23, 63, 147, 0.1);
  --page-accent-strong: #a3b5d9;
}

body.theme-light .glass-panel {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(226, 232, 240, 0.80) !important;
  box-shadow: 0 2px 16px -4px rgba(23, 63, 147, 0.06) !important;
}

body.theme-light .glass-nav {
  background: rgba(248, 250, 252, 0.88) !important;
  border-bottom-color: rgba(226, 232, 240, 0.70) !important;
}

body.theme-light .glow-point {
  background: radial-gradient(circle, rgba(23, 63, 147, 0.12) 0%, rgba(255, 255, 255, 0) 72%) !important;
}

body.theme-light .hero-shell {
  background: radial-gradient(circle at top left, rgba(163, 181, 217, 0.12), rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.88)) !important;
  border-color: rgba(226, 232, 240, 0.80) !important;
  box-shadow: 0 4px 32px -8px rgba(23, 63, 147, 0.10) !important;
}

body.theme-light .hero-shell > .absolute.inset-0 {
  opacity: 0.28;
}

body.theme-light .hero-shell [class*="conic-gradient"] {
  opacity: 0.16 !important;
}

body.theme-light .hero-cta-primary {
  border: 1px solid rgba(23, 63, 147, 0.16);
  box-shadow: 0 2px 12px -4px rgba(23, 63, 147, 0.10);
}

body.theme-light .hero-cta-secondary {
  background-color: rgba(255, 255, 255, 0.80) !important;
  border-color: rgba(226, 232, 240, 0.90) !important;
  color: #3a3a3a !important;
}

body.theme-light .text-white {
  color: #4d4d4d !important;
}

body.theme-light .text-white\/90,
body.theme-light .text-white\/80,
body.theme-light .text-white\/70,
body.theme-light .text-white\/60 {
  color: #4d4d4d !important;
}

body.theme-light .text-white\/50,
body.theme-light .text-white\/45,
body.theme-light .text-white\/40,
body.theme-light .text-white\/35,
body.theme-light .text-white\/30,
body.theme-light .text-white\/20 {
  color: #6b6b6b !important;
}

body.theme-light .text-neutral-300 {
  color: #4d4d4d !important;
}

body.theme-light .text-neutral-400 {
  color: #6b6b6b !important;
}

body.theme-light .text-neutral-500 {
  color: #7c7c7c !important;
}

body.theme-light .border-white\/5 {
  border-color: rgba(229, 229, 229, 0.7) !important;
}

body.theme-light .border-white\/10 {
  border-color: rgba(229, 229, 229, 0.96) !important;
}

body.theme-light .bg-white\/5,
body.theme-light .bg-white\/10,
body.theme-light .bg-white\/20 {
  background-color: rgba(255, 255, 255, 0.96) !important;
}

body.theme-light .bg-white\/\[0\.02\],
body.theme-light .bg-white\/\[0\.03\],
body.theme-light .bg-white\/\[0\.05\] {
  background-color: rgba(248, 248, 248, 0.98) !important;
}

body.theme-light .bg-black {
  background-color: #ffffff !important;
}

body.theme-light .bg-black\/20,
body.theme-light .bg-black\/30,
body.theme-light .bg-black\/35 {
  background-color: rgba(55, 52, 53, 0.04) !important;
}

body.theme-light .bg-black\/60 {
  background-color: rgba(255, 255, 255, 0.94) !important;
}

body.theme-light .bg-neutral-900 {
  background-color: rgba(55, 52, 53, 0.05) !important;
}

body.theme-light .bg-sky-500\/15,
body.theme-light .bg-sky-500\/10 {
  background-color: rgba(102, 184, 66, 0.08) !important;
}

body.theme-light .text-sky-400,
body.theme-light .text-sky-500,
body.theme-light .text-sky-600 {
  color: #173f93 !important;
}

body.theme-light .border-sky-500\/20,
body.theme-light .border-sky-500\/30 {
  border-color: rgba(23, 63, 147, 0.22) !important;
}

body.theme-light .hover\:bg-white\/5:hover,
body.theme-light .hover\:bg-white\/10:hover {
  background-color: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 2px 12px -4px rgba(23, 63, 147, 0.08);
}

body.theme-light .hover\:border-white\/20:hover {
  border-color: rgba(23, 63, 147, 0.20) !important;
}

body.theme-light [style*="--border-gradient"]::before {
  background: linear-gradient(135deg, rgba(55, 52, 53, 0.16), rgba(255, 255, 255, 0), rgba(55, 52, 53, 0.08)) !important;
}

body.theme-light [class*="text-[#66B842]"] {
  color: #173f93 !important;
}

body.theme-light [class*="bg-[#66B842]"] {
  background-color: rgba(23, 63, 147, 0.12) !important;
}

body.theme-light [class*="border-[#66B842]"] {
  border-color: rgba(23, 63, 147, 0.24) !important;
}

body.theme-light [class*="text-green-300"] {
  color: #173f93 !important;
}

body.theme-light [class*="text-sky-300"] {
  color: #4b6ec0 !important;
}

body.theme-light [class*="text-yellow-200"] {
  color: #b45309 !important;
}

body.theme-light::selection {
  background: rgba(23, 63, 147, 0.15);
  color: #173F93;
}

/* Light mode: azul claro #A3B5D9 → azul escuro #173F93 */
body.theme-light [class*="text-[#A3B5D9]"] {
  color: #173F93 !important;
}

body.theme-light [class*="bg-[#A3B5D9]"]:not([class*="gradient"]) {
  background-color: #173F93 !important;
}

body.theme-light [class*="bg-[#A3B5D9]/"] {
  background-color: rgba(23, 63, 147, 0.08) !important;
}

body.theme-light [class*="border-[#A3B5D9]/"] {
  border-color: rgba(23, 63, 147, 0.15) !important;
}

body.theme-dark {
  color-scheme: dark;
}

body.theme-dark {
  background-color: #0B1220 !important;
  color: #ffffff !important;
  --page-text: #ffffff;
  --page-muted: #94a3b8;
  --page-glow: rgba(163, 181, 217, 0.18);
  --page-accent: #a3b5d9;
  --page-accent-soft: rgba(163, 181, 217, 0.1);
  --page-accent-strong: #d9e2f4;
}

body.theme-dark .glass-panel {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 40px -20px rgba(0, 0, 0, 0.4);
}

body.theme-dark .glass-nav {
  background: rgba(11, 18, 32, 0.75) !important;
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

body.theme-dark .glow-point {
  background: radial-gradient(circle, rgba(163, 181, 217, 0.22) 0%, rgba(11, 18, 32, 0) 72%) !important;
}

body.theme-dark .text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #a3b5d9 55%, #6b87c4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.theme-dark .text-white {
  color: #ffffff !important;
}

body.theme-dark .text-white\/90 { color: rgba(255, 255, 255, 0.9) !important; }
body.theme-dark .text-white\/80 { color: rgba(255, 255, 255, 0.8) !important; }
body.theme-dark .text-white\/70 { color: rgba(255, 255, 255, 0.7) !important; }
body.theme-dark .text-white\/60 { color: rgba(255, 255, 255, 0.6) !important; }
body.theme-dark .text-white\/50 { color: rgba(255, 255, 255, 0.5) !important; }
body.theme-dark .text-white\/45 { color: rgba(255, 255, 255, 0.45) !important; }
body.theme-dark .text-white\/40 { color: rgba(255, 255, 255, 0.4) !important; }
body.theme-dark .text-white\/35 { color: rgba(255, 255, 255, 0.35) !important; }
body.theme-dark .text-white\/30 { color: rgba(255, 255, 255, 0.3) !important; }
body.theme-dark .text-white\/20 { color: rgba(255, 255, 255, 0.2) !important; }

body.theme-dark .border-white\/5 {
  border-color: rgba(255, 255, 255, 0.05) !important;
}

body.theme-dark .border-white\/10 {
  border-color: rgba(255, 255, 255, 0.10) !important;
}

body.theme-dark .bg-white\/5 {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

body.theme-dark .bg-white\/10 {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark .bg-white\/20 {
  background-color: rgba(255, 255, 255, 0.14) !important;
}

body.theme-dark .bg-white\/\[0\.02\],
body.theme-dark .bg-white\/\[0\.03\] {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

body.theme-dark .bg-black {
  background-color: #0B1220 !important;
}

body.theme-dark .bg-black\/20 {
  background-color: rgba(0, 0, 0, 0.2) !important;
}

body.theme-dark .bg-black\/30 {
  background-color: rgba(0, 0, 0, 0.3) !important;
}

body.theme-dark .bg-black\/35 {
  background-color: rgba(0, 0, 0, 0.35) !important;
}

body.theme-dark .bg-black\/60 {
  background-color: rgba(0, 0, 0, 0.6) !important;
}

body.theme-dark .bg-neutral-900 {
  background-color: #111827 !important;
}

body.theme-dark .bg-sky-500\/15,
body.theme-dark .bg-sky-500\/10 {
  background-color: rgba(102, 184, 66, 0.08) !important;
}

body.theme-dark .text-sky-400,
body.theme-dark .text-sky-500,
body.theme-dark .text-sky-600 {
  color: #a3b5d9 !important;
}

body.theme-dark .border-sky-500\/20,
body.theme-dark .border-sky-500\/30 {
  border-color: rgba(163, 181, 217, 0.22) !important;
}

body.theme-dark .hover\:bg-white\/5:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

body.theme-dark .hover\:bg-white\/10:hover {
  background-color: rgba(255, 255, 255, 0.12) !important;
}

body.theme-dark .hover\:border-white\/20:hover {
  border-color: rgba(163, 181, 217, 0.24) !important;
}

body.theme-dark [class*="text-[#66B842]"] {
  color: #a3b5d9 !important;
}

body.theme-dark [class*="bg-[#66B842]"] {
  background-color: rgba(163, 181, 217, 0.12) !important;
}

body.theme-dark [class*="border-[#66B842]"] {
  border-color: rgba(163, 181, 217, 0.24) !important;
}

body.theme-dark [class*="text-green-300"] {
  color: #a3b5d9 !important;
}

body.theme-dark [class*="text-sky-300"] {
  color: #d9e2f4 !important;
}

body.theme-dark [class*="text-yellow-200"] {
  color: #d9e2f4 !important;
}

body.theme-dark::selection {
  background: rgba(163, 181, 217, 0.24);
  color: #0B1220;
}

/* Dark mode: azul escuro #173F93 → azul claro #A3B5D9 */
body.theme-dark [class*="text-[#173F93]"] {
  color: #A3B5D9 !important;
}

body.theme-dark [class*="bg-[#173F93]"]:not([class*="bg-[#173F93]/"]) {
  background-color: #A3B5D9 !important;
}

body.theme-dark [class*="bg-[#173F93]/"] {
  background-color: rgba(163, 181, 217, 0.10) !important;
}

body.theme-dark [class*="border-[#173F93]/"] {
  border-color: rgba(163, 181, 217, 0.20) !important;
}

body.theme-dark [class*="hover:border-[#173F93]"]:hover {
  border-color: rgba(163, 181, 217, 0.30) !important;
}

body.theme-dark .group:hover [class*="group-hover:border-[#173F93]"] {
  border-color: #A3B5D9 !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in-up,
  .reveal-item {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}
