/* ── Performance: Native, crisp cursor behavior with optimal responsiveness ── */
#cursor-dot,
#cursor-aura {
  display: none !important;
  pointer-events: none !important;
}

a, button, [role="button"], input[type="submit"], input[type="button"], select {
  cursor: pointer;
  touch-action: manipulation;
}

/* ── Mobile & Touch Device Optimization: Native touch, no floating cursor, safe font size ── */
@media (hover: none) or (pointer: coarse) {
  #cursor-dot,
  #cursor-aura {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  * {
    cursor: auto !important;
  }

  a, button, [role="button"], input[type="submit"], input[type="button"], select {
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(184, 152, 69, 0.12);
    touch-action: manipulation;
  }

  /* Prevent auto-zooming on input focus on iOS Safari */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ── Scroll reveal animations ────────────────────────────────────────────── */
/* Use will-change only during transition, removed automatically by .visible */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal        { transform: translateY(36px); }
.reveal-left   { transform: translateX(-36px); }
.reveal-right  { transform: translateX(36px); }

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto; /* free the layer once done */
}

/* ── Glass morphism ──────────────────────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);          /* reduced from 14px — same look, cheaper */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  /* isolate stacking context so blur doesn't repaint parent */
  isolation: isolate;
}

.dark .glass {
  background: rgba(21, 20, 16, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.frosted {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  isolation: isolate;
}

.dark .frosted {
  background: rgba(24, 22, 17, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Glassmorphism button ────────────────────────────────────────────────── */
.btn-glass {
  position: relative;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.4);
  border-radius: 9999px !important;
  color: #1a1a24 !important;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.03),
    inset 0 2px 2px rgba(255, 255, 255, 1);
  transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
  overflow: hidden;
  will-change: transform;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 1);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.05),
    inset 0 2px 4px rgba(255, 255, 255, 1);
  transform: translateY(-2px);
}

.dark .btn-glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: #f1f5f9 !important;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.dark .btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

/* ── Accent & background ─────────────────────────────────────────────────── */
.text-gradient-gold {
  background: linear-gradient(135deg, #765922 0%, #927029 45%, #806020 100%);
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  display: inline-block;
}

.gold-glow {
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.18);
}

.pearlescent {
  background-color: #faf7ef;
  background-image:
    radial-gradient(at 0% 0%, hsla(42, 39%, 30%, 0.06) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(45, 60%, 92%, 1) 0, transparent 50%),
    radial-gradient(at 50% 100%, hsla(0, 0%, 100%, 1) 0, transparent 50%);
}

.dark .pearlescent {
  background-color: #090908;
  background-image:
    radial-gradient(at 0% 0%, hsla(42, 45%, 16%, 0.3) 0, transparent 60%),
    radial-gradient(at 100% 0%, hsla(45, 35%, 14%, 0.35) 0, transparent 50%),
    radial-gradient(at 50% 100%, hsla(42, 20%, 6%, 0.7) 0, transparent 60%);
}

/* ── Global scrolling ────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  /* Smooth scrolling via CSS — no JS needed */
  -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #927029; border-radius: 3px; }

.dark ::-webkit-scrollbar-track { background: #100f0c; }
.dark ::-webkit-scrollbar-thumb { background: #d3b969; }


/* ── Navbar underline animation ──────────────────────────────────────────── */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #927029;
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ── Keyframes ───────────────────────────────────────────────────────────── */
@keyframes ping {
  0%       { transform: scale(1); opacity: 1; }
  75%, 100%{ transform: scale(2); opacity: 0; }
}

.animate-ping {
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.float {
  animation: float 4s ease-in-out infinite;
  will-change: transform;
}

/* ── Shimmer (for skeleton loaders etc.) ─────────────────────────────────── */
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%);  }
}

/* ── Reduce motion for accessibility ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:   0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration:  0.01ms !important;
    scroll-behavior:      auto !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
}

/* ── Comprehensive Dark Mode Theme Rules ────────────────────────────────── */
.dark body {
  background-color: #090908;
  color: #f1f5f9;
}

.dark .bg-bg-light {
  background-color: #090908 !important;
}

.dark .bg-slate-50 {
  background-color: #100f0c !important;
}

.dark .bg-white {
  background-color: #151410 !important;
  color: #f1f5f9;
}

.dark .bg-white\/70,
.dark .bg-white\/80,
.dark .bg-white\/90 {
  background-color: rgba(21, 20, 16, 0.85) !important;
}

.dark .text-charcoal {
  color: #f3f4f6 !important;
}

.dark .text-charcoal\/90,
.dark .text-charcoal\/80,
.dark .text-charcoal\/70 {
  color: #cbd5e1 !important;
}

.dark .text-charcoal\/60,
.dark .text-charcoal\/55,
.dark .text-charcoal\/50,
.dark .text-charcoal\/40 {
  color: #94a3b8 !important;
}

.dark .border-charcoal\/5,
.dark .border-charcoal\/10,
.dark .border-charcoal\/15,
.dark .border-charcoal\/20,
.dark .border-slate-200,
.dark .border-slate-100 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark input:not([type="checkbox"]):not([type="radio"]),
.dark textarea,
.dark select {
  background-color: #211f18 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f1f5f9 !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
  color: #64748b !important;
}

/* Modals and Dialogs */
.dark [id$="-modal"] > div {
  background-color: #151410 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
}

.dark #modal-backdrop {
  background-color: rgba(0, 0, 0, 0.75) !important;
}

/* ── Specific Section Optimizations for Dark Theme ──────────────────────── */
.dark #services {
  background-color: #090908;
}

.dark #benefits {
  background-color: #100f0c;
}

.dark #roadmap {
  background-color: #090908;
}

.dark #contact {
  background-color: #090908;
}

.dark .bg-cream {
  background-color: #100f0c !important;
}


.dark .text-gradient-gold { background-image: linear-gradient(120deg, #b89845, #f1e6ac 50%, #d3b969); }
