/* Onyx Detailing — shared visual system (keyframes, motion, and small utilities
   Tailwind's CDN build can't express) used across index/services/contact. */

::selection {
  background: #c9a15a;
  color: #0a0a0d;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0a0a0d;
}
::-webkit-scrollbar-thumb {
  background: #2a2a31;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a42;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #e3bb74;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Sticky header gains a blurred backdrop once the page scrolls */
#site-header {
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
#site-header.scrolled {
  background-color: rgba(10, 10, 13, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: #2a2a31;
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.7);
}

/* Mobile nav panel: smooth height transition instead of a hard show/hide */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#mobile-menu.open {
  max-height: 32rem;
}

/* Signature motif: a diagonal gold sweep that passes across an element on
   hover/focus — reads as light passing over a freshly polished panel. */
.shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(227, 187, 116, 0.35) 50%, transparent 58%);
  transform: translateX(-130%);
  transition: transform 0.85s cubic-bezier(0.2, 0.7, 0.3, 1);
  pointer-events: none;
}
.shine:hover::after,
.shine:focus-visible::after {
  transform: translateX(130%);
}

/* Ambient drifting glow blobs used behind hero / CTA panels */
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  pointer-events: none;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.08); }
}
.blob-drift {
  animation: drift 18s ease-in-out infinite;
}

/* Fine grain overlay for depth on dark panels */
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Infinite service-area ticker */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Scroll reveal: elements fade/rise into place; JS toggles .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle pulse used behind the primary CTA button */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}
.pulse-glow {
  animation: pulse-glow 3.2s ease-in-out infinite;
}

/* Respect users who've asked for less motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .shine::after,
  .blob-drift,
  .marquee-track,
  .pulse-glow {
    animation: none !important;
    transition: none !important;
  }
}
