/**
 * Custom animations and utilities
 * These extend the base Tailwind setup with project-specific animations
 */

/* ── Reveal Animation ────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ── Delay Utilities (for staggered animations) ────────────────── */
.delay-01 { transition-delay: 0.01s; }
.delay-05 { transition-delay: 0.05s; }
.delay-06 { transition-delay: 0.06s; }
.delay-08 { transition-delay: 0.08s; }
.delay-10 { transition-delay: 0.1s; }
.delay-12 { transition-delay: 0.12s; }
.delay-15 { transition-delay: 0.15s; }
.delay-16 { transition-delay: 0.16s; }
.delay-18 { transition-delay: 0.18s; }
.delay-20 { transition-delay: 0.2s; }
.delay-24 { transition-delay: 0.24s; }
.delay-30 { transition-delay: 0.3s; }
.delay-40 { transition-delay: 0.4s; }

/* ── Opacity Utilities ───────────────────────────────────────────── */
.opacity-60 { opacity: 0.6; }

/* ── Floating CTA ────────────────────────────────────────────── */
#floating-cta {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#floating-cta.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.floating-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1d95c9;
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 800;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(29,149,201,0.4);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  white-space: nowrap;
}

.floating-cta-btn:hover {
  background: #36aee2;
  box-shadow: 0 6px 24px rgba(29,149,201,0.5);
  transform: translateY(-1px);
}

.floating-li-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: background 0.15s, transform 0.15s;
  background-color: #0a66c2;
  border-color: rgba(255,255,255,0.1);
}

.floating-li-btn:hover {
  background-color: #004182;
  transform: translateY(-1px);
}

/* ── Mobile Menu Checkbox Toggle ───────────────────────────────── */
#menu-toggle-checkbox { display: none !important; }
#nav-mobile { display: none; }
#menu-toggle-checkbox:checked ~ #nav-mobile { display: block !important; }

/* ── Header Scroll Behavior ───────────────────────────────────── */
#nav {
  will-change: top;
  transition: top 0.3s linear;
  background: linear-gradient(180deg, #031622 0%, rgba(3, 22, 34, 0.95) 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#nav.no-transition { transition: none; }

/* ── Hero Section Background ────────────────────────────────────── */
#hero {
  background-image: url('/assets/img/hacker.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 976px) {
  #hero {
    min-height: min(100vh, 75vw);
  }
}

/* ── Hero Marquee Animations ───────────────────────────────────── */
@keyframes mq-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes mq-l { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.mq-r  { animation: mq-r 140s linear infinite; }
.mq-l  { animation: mq-l 120s linear infinite; }
.mq-r2 { animation: mq-r 160s linear infinite; }
