/* ============================================================
   MDADDY — Custom CSS (Tailwind CDN handles the rest)
   Only: gradient text, canvas, keyframes, JS-toggled states
   ============================================================ */

/* ── Animated golden gradient border on navbar ── */

#navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  padding: 1.5px;
  /* border thickness */
  background: linear-gradient(90deg,
      #B8860B 0%,
      #F5C518 20%,
      #FFD84D 35%,
      #FFF0A0 50%,
      #FFD84D 65%,
      #F5C518 80%,
      #B8860B 100%);
  background-size: 300% 100%;
  /* mask: show only the "padding ring" = the border */
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: navbar-border-shimmer 2.6s linear infinite;
  pointer-events: none;
}

/* ── Gradient text ── */
.grad-text {
  background: linear-gradient(90deg, #D4A017 0%, #FFD84D 60%, #FFF0A0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Gloss shimmer text — sweeping light over gold gradient ── */
.gloss-text {
  background: linear-gradient(105deg,
      #B8860B 0%,
      #F5C518 30%,
      #FFFDE0 48%,
      /* bright gloss highlight */
      #F5C518 52%,
      #FFD84D 70%,
      #B8860B 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gloss-sweep 3s ease-in-out infinite;
}

@keyframes gloss-sweep {
  0% {
    background-position: 150% 0;
  }

  50% {
    background-position: -50% 0;
  }

  100% {
    background-position: 150% 0;
  }
}

/* ── Hero line-by-line fade-in-up ── */
.hero-animate {
  opacity: 0;
  animation: fade-in-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Nav link hover + active (::after underline animation) ── */
.nav-link {
  color: rgba(240, 244, 255, 0.72);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  position: relative;
  transition: color 0.25s;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #B8860B 0%, #F5C518 50%, #FFD84D 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.nav-active {
  color: #F5C518;
}

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

/* ── Mobile nav links ── */
.nav-mobile-link {
  color: rgba(240, 244, 255, 0.80);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Hero canvas (fills sticky container) ── */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Progress bar ── */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(135deg, #B8860B 0%, #F5C518 50%, #FFD84D 100%);
  width: 0%;
  z-index: 20;
  box-shadow: 0 0 12px rgba(245, 197, 24, 0.65);
  transition: width 0.08s linear;
}

/* ── Keyframes ── */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.65);
  }
}

@keyframes bounce-arrow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(5px);
  }
}

@keyframes navbar-border-shimmer {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 300% 50%;
  }
}

/* ── JS-toggled states ── */

/* Navbar scrolled */
#navbar.scrolled {
  background: rgba(6, 9, 15, 0.486);
  border-color: rgb(255, 255, 255);
}

/* Feature cards — JS adds/removes .visible */
.feature-card {
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s, border-color 0.3s;
}

.feature-card.visible {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* Scroll indicator fade out */
.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Mobile menu */
.mobile-menu {
  display: none;
}

.mobile-menu.open {
  display: flex;
}

/* Hamburger → X */
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile hero responsive ── */
@media (max-width: 768px) {

  /* Canvas shifts right so POS machine is visible */
  #hero-canvas {
    width: 100% !important;
    left: 0 !important;
    object-position: right center;
  }

  /* Overlay: darker at top-left for text legibility, fades sooner on right */
  .hero-overlay-mobile {
    background:
      linear-gradient(to right,
        rgba(6, 9, 15, 0.97) 0%,
        rgba(6, 9, 15, 0.90) 50%,
        rgba(6, 9, 15, 0.45) 75%,
        transparent 100%),
      linear-gradient(to top, rgba(6, 9, 15, 0.60) 0%, transparent 30%);
  }

  /* Left column: full width, natural height, centered layout */
  .hero-text-col {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    top: 0 !important;
    bottom: auto !important;
    padding: 110px 5vw 0 5vw !important;
    justify-content: flex-start !important;
    gap: 1.25rem !important;
  }

  /* Feature cards: keep vertical column on mobile */
  aside[aria-label="Key features"] {
    flex-direction: column !important;
    overflow-x: unset;
    gap: 10px !important;
  }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  #navbar {
    top: 12px;
    width: calc(100% - 32px);
    padding: 0 18px;
    height: 52px;
  }

  #mobile-menu {
    top: 76px;
    width: calc(100% - 32px);
  }
}

/* =========================================
   SCROLLER SECTION (PineLabs style)
   ========================================= */

.mask-scroller {
  /* Fades out the top and bottom edges of the scrolling area */
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

@keyframes slide-up {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-50%);
  }

  /* Scrolls exactly half its duplicated height */
}

@keyframes slide-down {
  0% {
    transform: translateY(-50%);
  }

  100% {
    transform: translateY(0);
  }
}

.animate-scroll-up {
  /* Duplicated content means scrolling 50% loops it seamlessly */
  animation: slide-up 10s linear infinite;
  will-change: transform;
}

/* Pause on hover for better readability */
.animate-scroll-up:hover {
  animation-play-state: paused;
}

/* 
   Curve Offsets — PineLabs arc effect 
   Creates a curved path using structural translates.
*/
.curve-track>div {
  transition: transform 0.3s ease;
}

/* The curve peaks at 3 & 4 out of 6 items */
.curve-track>div:nth-child(6n+1) {
  transform: translateX(0px);
}

.curve-track>div:nth-child(6n+2) {
  transform: translateX(70px);
}

.curve-track>div:nth-child(6n+3) {
  transform: translateX(110px);
}

.curve-track>div:nth-child(6n+4) {
  transform: translateX(100px);
}

.curve-track>div:nth-child(6n+5) {
  transform: translateX(50px);
}

.curve-track>div:nth-child(6n+0) {
  transform: translateX(-10px);
}

/* Hover scale effect (adds to existing translate) */
.curve-track>div:nth-child(6n+1):hover {
  transform: translateX(0px) scale(1.02);
}

.curve-track>div:nth-child(6n+2):hover {
  transform: translateX(70px) scale(1.02);
}

.curve-track>div:nth-child(6n+3):hover {
  transform: translateX(110px) scale(1.02);
}

.curve-track>div:nth-child(6n+4):hover {
  transform: translateX(100px) scale(1.02);
}

.curve-track>div:nth-child(6n+5):hover {
  transform: translateX(50px) scale(1.02);
}

.curve-track>div:nth-child(6n+0):hover {
  transform: translateX(-10px) scale(1.02);
}

@keyframes loading-bar {
  0% { transform: translateX(-100%); width: 20%; }
  50% { transform: translateX(100%); width: 80%; }
  100% { transform: translateX(500%); width: 20%; }
}

.preloader-bar {
  animation: loading-bar 1.5s ease-in-out infinite;
}

/* ===================== SCROLL REVEAL ===================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal.delay-100 { transition-delay: 100ms; }
.reveal.delay-200 { transition-delay: 200ms; }
.reveal.delay-300 { transition-delay: 300ms; }
.reveal.delay-400 { transition-delay: 400ms; }
.reveal.delay-500 { transition-delay: 500ms; }