/* ============================================
   Neo-Brutalism Card Helpers
   ============================================ */
.dark .comic-card,
.dark .speech-bubble {
  background: rgb(var(--surface)) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
}

.dark .comic-card:hover,
.dark .speech-bubble:hover {
  border-color: rgba(255, 255, 255, 1) !important;
}

/* Infinite Marquee */
.marquee-wrapper {
  overflow: hidden;
  width: 100%;
  display: flex;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-ltr 28s linear infinite;
  gap: 1.5rem;
}

[dir="rtl"] .marquee-track {
  animation: marquee-rtl 28s linear infinite;
}

@keyframes marquee-ltr {
  0% {
    transform: translateX(0);
  }

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

@keyframes marquee-rtl {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(50%);
  }
}

/* ============================================
   Animation Tokens
   ============================================ */
:root {
  --anim-fast: 200ms;
  --anim-normal: 400ms;
  --anim-slow: 600ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Spin slow animation for play badge circular text */
.animate-spin-slow {
  animation: spin-clockwise 18s linear infinite;
}

@keyframes spin-clockwise {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Particles floating background */
.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--brand-blue);
  border-radius: 50%;
  opacity: 0.2;
  animation: particleFloat linear infinite;
}

.dark .particle {
  background: #60a5fa;
  opacity: 0.12;
}

.particle:nth-child(1) {
  left: 10%;
  top: 20%;
  animation-duration: 12s;
  animation-delay: 0s;
  width: 3px;
  height: 3px;
}

.particle:nth-child(2) {
  left: 25%;
  top: 60%;
  animation-duration: 15s;
  animation-delay: -2s;
  width: 5px;
  height: 5px;
}

.particle:nth-child(3) {
  left: 45%;
  top: 30%;
  animation-duration: 10s;
  animation-delay: -4s;
  width: 4px;
  height: 4px;
}

.particle:nth-child(4) {
  left: 65%;
  top: 70%;
  animation-duration: 13s;
  animation-delay: -6s;
  width: 3px;
  height: 3px;
}

.particle:nth-child(5) {
  left: 80%;
  top: 15%;
  animation-duration: 11s;
  animation-delay: -1s;
  width: 6px;
  height: 6px;
}

.particle:nth-child(6) {
  left: 90%;
  top: 50%;
  animation-duration: 14s;
  animation-delay: -3s;
  width: 4px;
  height: 4px;
}

.particle:nth-child(7) {
  left: 15%;
  top: 80%;
  animation-duration: 16s;
  animation-delay: -5s;
  width: 3px;
  height: 3px;
}

.particle:nth-child(8) {
  left: 55%;
  top: 10%;
  animation-duration: 9s;
  animation-delay: -7s;
  width: 5px;
  height: 5px;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 0.2;
  }

  50% {
    transform: translateY(-120px) translateX(40px);
    opacity: 0.1;
  }

  90% {
    opacity: 0.2;
  }

  100% {
    transform: translateY(-250px) translateX(-20px);
    opacity: 0;
  }
}

/* ============================================
   Stats Counter Section
   ============================================ */
.stats-section {
  position: relative;
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f9 50%, #fafbff 100%);
}

.dark .stats-section {
  background: linear-gradient(135deg, #050811 0%, #0b0f19 50%, #030712 100%);
}

.counter-number {
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.counter-card {
  position: relative;
  padding: 2rem;
  text-align: center;
  transition: transform var(--anim-normal) var(--ease-out-expo);
}

.counter-card:hover {
  transform: translateY(-4px);
}

.counter-card::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(var(--outline), 0.8), transparent);
}

html[dir="rtl"] .counter-card::after {
  right: auto;
  left: 0;
}

.counter-card:last-child::after {
  display: none;
}

/* ============================================
   Dual Model / Premium Price Cards
   ============================================ */
.model-card {
  position: relative;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.model-card:hover {
  transform: translateY(-8px);
}

.model-card-primary {
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
}

.model-card-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 40%, #2563eb 80%, #3b82f6 100%);
  z-index: 0;
  transition: opacity 0.5s ease;
}

.model-card-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.model-card-primary:hover {
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3),
    0 0 24px 2px rgba(147, 197, 253, 0.15);
}

.model-card-secondary {
  border: 1px solid rgba(var(--outline), 1);
  background-color: rgb(var(--surface));
  box-shadow: var(--shadow-md);
}

.model-card-secondary:hover {
  border-color: rgba(var(--brand-blue), 0.3);
  box-shadow: var(--shadow-lg);
}

/* Popular badge */
.popular-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

html[dir="rtl"] .popular-badge {
  left: auto;
  right: 1.5rem;
}

/* ============================================
   Bento / Layer Cards
   ============================================ */
.bento-layer-card {
  position: relative;
  overflow: hidden;
  transition: transform var(--anim-normal) var(--ease-out-expo),
    box-shadow var(--anim-normal) var(--ease-out-expo),
    border-color var(--anim-normal);
}

.bento-layer-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-blue);
}

.bento-layer-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(37, 99, 235, 0.02) 100%);
  opacity: 0;
  transition: opacity var(--anim-normal);
  pointer-events: none;
}

.bento-layer-card:hover::before {
  opacity: 1;
}

.layer-icon-wrap {
  transition: transform var(--anim-normal) var(--ease-out-expo),
    background-color var(--anim-normal);
}

.bento-layer-card:hover .layer-icon-wrap {
  transform: scale(1.08) rotate(3deg);
  background-color: rgba(37, 99, 235, 0.12);
}

.layer-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0.03;
  color: var(--brand-blue);
  pointer-events: none;
}

html[dir="rtl"] .layer-number {
  right: auto;
  left: 1rem;
}

.dark .layer-number {
  color: #60a5fa;
  opacity: 0.05;
}

/* ============================================
   Value Proposition / CTA
   ============================================ */
.value-prop-bg {
  position: relative;
  background: linear-gradient(135deg, #050d1a 0%, #08162b 50%, #030712 100%);
  overflow: hidden;
}

.value-prop-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(122, 90, 248, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.value-quote-mark {
  position: absolute;
  font-size: 11rem;
  line-height: 1;
  font-family: 'Cairo', system-ui, sans-serif;
  opacity: 0.04;
  color: white;
  top: -1.5rem;
  right: -1rem;
  pointer-events: none;
}

html[dir="rtl"] .value-quote-mark {
  right: auto;
  left: -1rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: transform var(--anim-normal) var(--ease-out-expo),
    background var(--anim-normal);
}

.metric-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
}

.dark .metric-card {
  background: rgba(11, 15, 25, 0.6);
  border-color: rgba(255, 255, 255, 0.06);
}

.dark .metric-card:hover {
  background: rgba(11, 15, 25, 0.75);
}

/* Carousel dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(var(--outline), 0.8);
  border: none;
  cursor: pointer;
  transition: all var(--anim-fast);
  padding: 0;
}

.carousel-dot.active {
  background: var(--brand-blue);
  width: 24px;
  border-radius: 4px;
}

.dark .carousel-dot.active {
  background: #60a5fa;
}

/* Back to Top button modern styling - Creative Neubrutalism */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  left: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgb(var(--surface));
  color: rgb(var(--on-background));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--neo-border-color);
  box-shadow: var(--neo-shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease, background-color 0.15s ease;
  cursor: pointer;
  z-index: 90;
  padding: 0;
}

html[dir="rtl"] .back-to-top {
  right: auto;
  left: 2rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top.visible:hover {
  background: rgb(var(--surface-dim));
  transform: translate(-2px, -2px);
  box-shadow: var(--neo-shadow-md);
  border-color: var(--neo-border-color);
}

.back-to-top.visible:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {

  .particle,
  .popular-badge,
  .geo-shape-1,
  .geo-shape-2,
  .geo-shape-3 {
    animation: none !important;
  }

  .js-enabled .reveal,
  .js-enabled .reveal-up,
  .js-enabled .reveal-scale,
  .js-enabled .reveal-right,
  .js-enabled .check-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
  .counter-card::after {
    display: none;
  }

  .counter-card {
    border-bottom: 1px solid rgba(var(--outline), 0.8);
    padding: 1.5rem;
  }

  .counter-card:last-child {
    border-bottom: none;
  }

  .value-quote-mark {
    font-size: 6rem;
  }
}