/* Drivana Landing Page — Custom Styles */

/* Base styles */
body {
  background: #050A14;
  color: #0F172A;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 60;
  background: linear-gradient(90deg, #0EA5E9, #22D3EE);
  transition: width 0.1s linear;
}

/* Keyframe animations */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes glow-pulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

.animate-glow-pulse {
  animation: glow-pulse 4s ease-in-out infinite;
}

/* Reveal on scroll animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .animate-float,
  .animate-glow-pulse {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Mobile menu hidden state */
#mobile-drawer[hidden] {
  display: none;
}

/* Waitlist form states */
#wl-success[hidden],
#wl-error[hidden] {
  display: none;
}

/* Price toggle visibility — JS sets body[data-billing] */
body[data-billing="monthly"] [data-price="yearly"],
body[data-billing="monthly"] [data-billing="yearly"],
body[data-billing="yearly"] [data-price="monthly"],
body[data-billing="yearly"] [data-billing="monthly"] {
  display: none;
}

/* Nav scrolled state */
#site-header.is-scrolled {
  background: rgba(5, 10, 20, 0.92) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Mobile menu icon toggle */
#mobile-menu-btn [data-menu-close] {
  display: none;
}

#mobile-menu-btn.is-open [data-menu-open] {
  display: none;
}

#mobile-menu-btn.is-open [data-menu-close] {
  display: inline-flex;
}

/* Billing toggle active states — driven purely by body[data-billing] */
#billing-monthly,
#billing-yearly {
  color: #94a3b8;
}

body[data-billing="monthly"] #billing-monthly {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body[data-billing="yearly"] #billing-yearly {
  background: rgba(14, 165, 233, 0.2);
  color: #fff;
}

#page {
  position: relative;
  z-index: 1;
}

/* ===== Cursor glow-card system (restores bento border-spotlight) ===== */
[data-glow-grid] {
  position: relative;
}

.glow-grid-blob {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  background: radial-gradient(700px circle at var(--grid-mouse-x, -999px) var(--grid-mouse-y, -999px), rgba(34, 211, 238, 0.055), transparent 60%);
}

[data-glow-grid]:hover .glow-grid-blob {
  opacity: 1;
}

[data-glow-card] {
  position: relative;
}

.glow-card-border,
.glow-card-fill {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.45s ease;
}

[data-glow-card]:hover .glow-card-border,
[data-glow-card]:hover .glow-card-fill {
  opacity: 1;
}

/* Border spotlight — mask-exclude reveals the glow ONLY on the border edge */
.glow-card-border {
  background: radial-gradient(420px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(34, 211, 238, 0.6), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1.5px;
}

/* Inner ambient fill — soft depth, very low opacity */
.glow-card-fill {
  background: radial-gradient(520px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(14, 165, 233, 0.10), transparent 50%);
}

@media (prefers-reduced-motion: reduce) {

  .glow-grid-blob,
  .glow-card-border,
  .glow-card-fill {
    transition: none;
  }
}

/* Gradient text helper (used by inline spans) */
.grad-text {
  background: linear-gradient(90deg, #0EA5E9, #22D3EE);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Operations Ticker Infinite Motion */
@keyframes ticker-scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.animate-ticker {
  display: flex;
  width: max-content;
  animation: ticker-scroll 45s linear infinite;
}

.animate-ticker:hover {
  animation-play-state: paused;
}

/* Floating Activity Cards Transitions */
.activity-card-fade {
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.activity-card-fade.fade-out {
  opacity: 0;
  transform: translateY(4px);
}

.activity-card-fade-bottom {
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.activity-card-fade-bottom.fade-out {
  opacity: 0;
  transform: translate(-50%, 4px);
}

/* ===== Sprint 2 Premium Animations ===== */

/* Chart bar breathing effect */
@keyframes bar-breath {

  0%,
  100% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(1.035);
  }
}

.chart-bar {
  transform-origin: bottom;
  transition: height 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.chart-bar-breath-1 {
  animation: bar-breath 4.2s ease-in-out infinite;
}

.chart-bar-breath-2 {
  animation: bar-breath 4.8s ease-in-out infinite 0.6s;
}

.chart-bar-breath-3 {
  animation: bar-breath 5.4s ease-in-out infinite 1.2s;
}

/* KPI Card update highlight pulse */
@keyframes kpi-highlight {
  0% {
    border-color: rgba(14, 165, 233, 0.5);
    background: rgba(14, 165, 233, 0.08);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.15);
  }

  100% {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
  }
}

.kpi-pulse-active {
  animation: kpi-highlight 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Newest Operations Feed item highlight pulse */
@keyframes feed-newest-glow {
  0% {
    color: #FFFFFF;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  }

  100% {
    color: #F8FAFC;
    text-shadow: none;
  }
}

.feed-item-newest {
  animation: feed-newest-glow 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== Sprint 3 Feature Showcase Demos ===== */

/* Showcase 02 Fleet View Alert Pulse for Overdue */
@keyframes alert-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.15);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    background: rgba(239, 68, 68, 0.3);
  }
}

.demo-alert-pulse {
  animation: alert-pulse 1.6s infinite;
}

/* Showcase 03 Payment Highlight Glow */
@keyframes payment-highlight {

  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
  }

  50% {
    border-color: rgba(14, 165, 233, 0.45);
    background: rgba(14, 165, 233, 0.06);
  }
}

.demo-payment-highlight {
  animation: payment-highlight 2s ease-in-out infinite;
}

/* Signature typing cursor effect */
@keyframes typing-sig {
  from {
    width: 0;
  }

  to {
    width: 62px;
  }
}

.demo-sig-animate {
  overflow: hidden;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
  animation: typing-sig 1.5s steps(20, end) forwards;
}

/* ===== Sprint 4 Workflow Interactive Timeline Helpers ===== */

/* Desktop Only: Sticky Parallax Timeline behavior */
@media (min-width: 1024px) {
  .workflow-step-trigger {
    opacity: 0.35 !important;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .workflow-step-trigger.active {
    opacity: 1 !important;
  }

  /* Animated Arrow Directional Pulse (Down) */
  @keyframes slide-down {
    0%, 100% {
      transform: translateY(0);
      opacity: 0.4;
    }
    50% {
      transform: translateY(4px);
      opacity: 1;
    }
  }

  .animate-slide-down {
    animation: slide-down 1.5s ease-in-out infinite;
  }
  /* Desktop Sticky Screenshot Viewport transitioning panes */
  .workflow-screenshot-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
  }

  .workflow-screenshot-pane.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
}

/* ===== Mobile Only: Workflow Horizontal Tabs Timeline ===== */

/* Animated Arrow Directional Pulse */
@keyframes slide-pulse {
  0%, 100% {
    transform: translateX(0);
    opacity: 0.4;
  }
  50% {
    transform: translateX(4px);
    opacity: 1;
  }
}

.animate-slide-pulse {
  animation: slide-pulse 1.5s ease-in-out infinite;
}

/* Panel Display Transition States */
.workflow-tab-panel {
  display: none !important;
  opacity: 0;
  transform: translateY(16px) scale(0.99);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.workflow-tab-panel.active {
  display: flex !important;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.workflow-tab-panel img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

/* Global layout fallbacks */
.hidden {
  display: none !important;
}

.block {
  display: block !important;
}

/* Compile-safe Tailwind desktop layout class fallbacks (since static build lacks these utilities) */
@media (min-width: 768px) {
  .md\:flex {
    display: flex !important;
  }
  .md\:hidden {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .lg\:flex {
    display: flex !important;
  }

  .lg\:flex-row {
    flex-direction: row !important;
  }

  .lg\:items-start {
    align-items: flex-start !important;
  }

  .lg\:hidden {
    display: none !important;
  }

  .lg\:block {
    display: block !important;
  }

  .lg\:sticky {
    position: -webkit-sticky !important;
    position: sticky !important;
  }

  .lg\:top-36 {
    top: 9rem !important;
  }

  .lg\:w-\[42\%\] {
    width: 42% !important;
    flex-shrink: 0 !important;
  }

  .lg\:w-\[58\%\] {
    width: 58% !important;
    max-width: 58% !important;
    flex-shrink: 0 !important;
  }

  .lg\:gap-16 {
    gap: 4rem !important;
  }
}
