/* ============================================================
   VISUAL EFFECTS — effects.css
   Version: S227
   Scope: buddocloud.com + oclconsulting.com

   What this file provides:
     1.  Glassmorphism utility classes
     2.  Gradient system (text, background, overlay)
     3.  Glow effects (box-shadow based)
     4.  Hover micro-interactions
     5.  Entrance animation utilities
     6.  Decorative elements (borders, dots, lines, geometry)
     7.  Parallax & scroll utilities
     8.  Page transition helpers

   Load order: tokens.css → layout.css → components.css → dark-mode.css → effects.css

   ALL animated effects respect @media (prefers-reduced-motion: reduce).
   ============================================================ */


/* ============================================================
   1. GLASSMORPHISM UTILITIES
   backdrop-filter: blur — Safari requires -webkit- prefix.
   @supports fallback provides opaque solid bg for older browsers.
   ============================================================ */

/* ---- Neutral glass — works on both light and dark backgrounds ---- */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
  }
}

/* ---- Dark glass — buddocloud feature cards and hero overlays ---- */
.glass-dark {
  background: rgba(10, 10, 15, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(79, 179, 255, 0.20);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-dark {
    background: rgba(10, 10, 15, 0.88);
    border: 1px solid rgba(79, 179, 255, 0.35);
  }
}

/* ---- Light glass — OCL panels, nav on scroll ---- */
.glass-light {
  background: rgba(248, 246, 242, 0.60);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(45, 95, 74, 0.15);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-light {
    background: rgba(248, 246, 242, 0.85);
    border: 1px solid rgba(45, 95, 74, 0.30);
  }
}

/* ---- Blue-tinted glass — buddocloud feature cards ---- */
.glass-blue {
  background: rgba(79, 179, 255, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(79, 179, 255, 0.25);
  box-shadow: 0 4px 24px rgba(79, 179, 255, 0.08);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-blue {
    background: rgba(79, 179, 255, 0.20);
    border: 1px solid rgba(79, 179, 255, 0.40);
  }
}

/* ---- Gold-tinted glass ---- */
.glass-gold {
  background: rgba(255, 184, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 184, 0, 0.20);
  box-shadow: 0 4px 24px rgba(255, 184, 0, 0.06);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-gold {
    background: rgba(255, 184, 0, 0.18);
    border: 1px solid rgba(255, 184, 0, 0.35);
  }
}

/* ---- Green-tinted glass — OCL use ---- */
.glass-green {
  background: rgba(45, 95, 74, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(45, 95, 74, 0.20);
  box-shadow: 0 4px 24px rgba(45, 95, 74, 0.06);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-green {
    background: rgba(45, 95, 74, 0.20);
    border: 1px solid rgba(45, 95, 74, 0.35);
  }
}


/* ============================================================
   2. GRADIENT SYSTEM
   ============================================================ */

/* ---- Text gradients (background-clip: text technique) ---- */

.gradient-text-blue {
  background: linear-gradient(135deg, #4fb3ff 0%, #2d7fc1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #ffb800 0%, #d49200 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.gradient-text-blue-gold {
  background: linear-gradient(135deg, #4fb3ff 0%, #4fb3ff 35%, #ffb800 65%, #ffb800 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.gradient-text-green {
  background: linear-gradient(135deg, #3d8a6c 0%, #2d5f4a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.gradient-text-green-gold {
  background: linear-gradient(135deg, #3d8a6c 0%, #2d5f4a 35%, #c8963c 65%, #c8963c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---- Background gradients ---- */

/* Dark mesh/radial for buddocloud hero sections */
.gradient-bg-dark {
  background:
    radial-gradient(ellipse at 50% 0%, #1a1a2e 0%, #0e0e1a 40%, #0a0a0f 100%);
}

/* Warm light gradient for OCL hero sections */
.gradient-bg-warm {
  background: linear-gradient(135deg, #f8f6f2 0%, #ede4d3 50%, #e0d4bc 100%);
}

/* Subtle brand-tinted overlay gradients */
.gradient-bg-blue {
  background: linear-gradient(135deg,
    rgba(79, 179, 255, 0.08) 0%,
    rgba(79, 179, 255, 0.03) 100%
  );
}

.gradient-bg-green {
  background: linear-gradient(135deg,
    rgba(45, 95, 74, 0.08) 0%,
    rgba(45, 95, 74, 0.03) 100%
  );
}

/* ---- Overlay gradients (use with position:relative parent and position:absolute child) ---- */

/* Bottom fade for text legibility on images */
.gradient-overlay-bottom {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.30) 40%,
    rgba(0, 0, 0, 0) 70%
  );
}

/* Top fade */
.gradient-overlay-top {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.30) 40%,
    rgba(0, 0, 0, 0) 70%
  );
}

/* Radial blue glow from center — decorative buddocloud background element */
.gradient-radial-blue {
  background: radial-gradient(
    ellipse at center,
    rgba(79, 179, 255, 0.28) 0%,
    rgba(79, 179, 255, 0.08) 40%,
    rgba(79, 179, 255, 0) 70%
  );
}

/* Radial gold glow */
.gradient-radial-gold {
  background: radial-gradient(
    ellipse at center,
    rgba(255, 184, 0, 0.28) 0%,
    rgba(255, 184, 0, 0.08) 40%,
    rgba(255, 184, 0, 0) 70%
  );
}


/* ============================================================
   3. GLOW EFFECTS
   All use multi-layer box-shadow for depth.
   sm = subtle ambient, md = hover-ready, lg = strong focal glow.
   ============================================================ */

/* ---- Blue glows (buddocloud primary) ---- */
.glow-blue-sm {
  box-shadow: 0 0 8px rgba(79, 179, 255, 0.20);
}

.glow-blue-md {
  box-shadow:
    0 0 10px rgba(79, 179, 255, 0.30),
    0 0 24px rgba(79, 179, 255, 0.12);
}

.glow-blue-lg {
  box-shadow:
    0 0 12px rgba(79, 179, 255, 0.45),
    0 0 30px rgba(79, 179, 255, 0.22),
    0 0 60px rgba(79, 179, 255, 0.08);
}

/* ---- Gold glows (buddocloud secondary, OCL secondary) ---- */
.glow-gold-sm {
  box-shadow: 0 0 8px rgba(255, 184, 0, 0.20);
}

.glow-gold-md {
  box-shadow:
    0 0 10px rgba(255, 184, 0, 0.32),
    0 0 24px rgba(255, 184, 0, 0.12);
}

.glow-gold-lg {
  box-shadow:
    0 0 12px rgba(255, 184, 0, 0.48),
    0 0 30px rgba(255, 184, 0, 0.24),
    0 0 60px rgba(255, 184, 0, 0.08);
}

/* ---- Green glows (OCL primary) ---- */
.glow-green-sm {
  box-shadow: 0 0 8px rgba(45, 95, 74, 0.25);
}

.glow-green-md {
  box-shadow:
    0 0 10px rgba(45, 95, 74, 0.35),
    0 0 24px rgba(45, 95, 74, 0.15);
}

/* ---- Hover glows — applied only on :hover with transition ---- */
.hover-glow-blue {
  transition: box-shadow 250ms ease;
}

.hover-glow-blue:hover {
  box-shadow:
    0 0 12px rgba(79, 179, 255, 0.45),
    0 0 28px rgba(79, 179, 255, 0.20);
}

.hover-glow-gold {
  transition: box-shadow 250ms ease;
}

.hover-glow-gold:hover {
  box-shadow:
    0 0 12px rgba(255, 184, 0, 0.45),
    0 0 28px rgba(255, 184, 0, 0.20);
}

/* ---- Animated pulse glows — for CTAs and focal elements ---- */
@keyframes glow-pulse-blue {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(79, 179, 255, 0.25),
      0 0 16px rgba(79, 179, 255, 0.10);
  }
  50% {
    box-shadow:
      0 0 14px rgba(79, 179, 255, 0.55),
      0 0 32px rgba(79, 179, 255, 0.28),
      0 0 60px rgba(79, 179, 255, 0.10);
  }
}

@keyframes glow-pulse-gold {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(255, 184, 0, 0.25),
      0 0 16px rgba(255, 184, 0, 0.10);
  }
  50% {
    box-shadow:
      0 0 14px rgba(255, 184, 0, 0.55),
      0 0 32px rgba(255, 184, 0, 0.28),
      0 0 60px rgba(255, 184, 0, 0.10);
  }
}

.glow-pulse-blue {
  animation: glow-pulse-blue 2s ease-in-out infinite;
}

.glow-pulse-gold {
  animation: glow-pulse-gold 2s ease-in-out infinite;
}

/* Reduced-motion: static glow, no animation */
@media (prefers-reduced-motion: reduce) {
  .glow-pulse-blue {
    animation: none;
    box-shadow: 0 0 10px rgba(79, 179, 255, 0.30);
  }

  .glow-pulse-gold {
    animation: none;
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.30);
  }
}


/* ============================================================
   4. HOVER MICRO-INTERACTIONS
   Transform-based lift, scale, shine, and border effects.
   All transitions use token durations where possible.
   ============================================================ */

/* ---- Lift effects ---- */
.hover-lift-sm,
.hover-lift-md,
.hover-lift-lg {
  transform: translateY(0);
}

.hover-lift-sm {
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.hover-lift-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.hover-lift-md {
  transition: transform 175ms ease, box-shadow 200ms ease;
}
.hover-lift-md:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.hover-lift-lg {
  transition: transform 200ms ease, box-shadow 250ms ease;
}
.hover-lift-lg:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

/* ---- Scale effects ---- */
.hover-scale-sm {
  transition: transform 150ms ease;
}
.hover-scale-sm:hover {
  transform: scale(1.02);
}

.hover-scale-md {
  transition: transform 175ms ease;
}
.hover-scale-md:hover {
  transform: scale(1.05);
}

.hover-grow {
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.hover-grow:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ---- Shine sweep effect ---- */
/* Diagonal light highlight sweeps across on hover. Requires overflow: hidden on element. */
.hover-shine {
  position: relative;
  overflow: hidden;
}

.hover-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 60%
  );
  transform: translateX(-150%);
  transition: transform 400ms ease;
  pointer-events: none;
  z-index: 1;
}

.hover-shine:hover::before {
  transform: translateX(150%);
}

/* ---- Border glow on hover ---- */
.hover-border-glow {
  transition: box-shadow 200ms ease;
}

.hover-border-glow:hover {
  box-shadow:
    0 0 0 2px rgba(79, 179, 255, 0.50),
    0 0 14px rgba(79, 179, 255, 0.18);
}

/* OCL variant — green border glow */
.ocl .hover-border-glow:hover {
  box-shadow:
    0 0 0 2px rgba(45, 95, 74, 0.50),
    0 0 14px rgba(45, 95, 74, 0.18);
}

/* ---- Arrow shift on hover ---- */
/* Usage: <a class="hover-arrow">Read more <span class="arrow-icon">→</span></a> */
.hover-arrow .arrow-icon {
  display: inline-block;
  transition: transform 200ms ease;
}

.hover-arrow:hover .arrow-icon {
  transform: translateX(4px);
}

/* ---- Reduced motion: disable all hover transforms ---- */
@media (prefers-reduced-motion: reduce) {
  .hover-lift-sm,
  .hover-lift-md,
  .hover-lift-lg,
  .hover-scale-sm,
  .hover-scale-md,
  .hover-grow {
    transition: none;
  }

  .hover-lift-sm:hover,
  .hover-lift-md:hover,
  .hover-lift-lg:hover,
  .hover-scale-sm:hover,
  .hover-scale-md:hover,
  .hover-grow:hover {
    transform: none;
    box-shadow: none;
  }

  .hover-shine::before {
    display: none;
  }

  .hover-border-glow {
    transition: none;
  }

  .hover-border-glow:hover {
    box-shadow: none;
  }

  .hover-arrow .arrow-icon {
    transition: none;
  }

  .hover-arrow:hover .arrow-icon {
    transform: none;
  }
}


/* ============================================================
   5. ENTRANCE ANIMATIONS
   IntersectionObserver adds .is-visible to trigger animations.
   Elements start hidden/transformed, animate in when .is-visible is added.
   ============================================================ */

/* ---- @keyframes definitions ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes blurIn {
  from { opacity: 0; filter: blur(8px); }
  to   { opacity: 1; filter: blur(0px); }
}

@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes shimmerSweep {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

/* ---- Entrance utility classes (hidden by default, fire on .is-visible) ---- */
.anim-fade-in,
.anim-slide-up,
.anim-slide-down,
.anim-slide-left,
.anim-slide-right,
.anim-scale-up,
.anim-blur-in {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-duration: 600ms;
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* Animate when .is-visible class is added by IntersectionObserver */
.anim-fade-in.is-visible  { animation-name: fadeInUp; }
.anim-slide-up.is-visible  { animation-name: fadeInUp; }
.anim-slide-down.is-visible { animation-name: fadeInDown; }
.anim-slide-left.is-visible  { animation-name: fadeInLeft; }
.anim-slide-right.is-visible { animation-name: fadeInRight; }
.anim-scale-up.is-visible  { animation-name: scaleUp; }
.anim-blur-in.is-visible   { animation-name: blurIn; }

/* ---- Stagger delay utilities ---- */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ---- Decorative / continuous animations ---- */
.anim-float {
  animation: floatBob 3s ease-in-out infinite;
}

.anim-spin-slow {
  animation: spinSlow 20s linear infinite;
}

/* Text shimmer effect — gradient that sweeps across */
.anim-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.40) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmerSweep 2s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---- Reduced motion — all anim-* immediately visible, no animation ---- */
@media (prefers-reduced-motion: reduce) {
  .anim-fade-in,
  .anim-slide-up,
  .anim-slide-down,
  .anim-slide-left,
  .anim-slide-right,
  .anim-scale-up,
  .anim-blur-in,
  .anim-float,
  .anim-spin-slow,
  .anim-shimmer {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    -webkit-text-fill-color: currentColor;
    color: inherit;
    background: none;
  }
}


/* ============================================================
   6. SCROLL REVEAL UTILITIES
   JS adds .scrolled class when element enters viewport.
   Separate from .anim-* (those use animation; these use transition).
   ============================================================ */

.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 600ms cubic-bezier(0, 0, 0.2, 1),
    transform 600ms cubic-bezier(0, 0, 0.2, 1);
}

.scroll-reveal.scrolled {
  opacity: 1;
  transform: none;
}

.scroll-reveal-left {
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity 600ms cubic-bezier(0, 0, 0.2, 1),
    transform 600ms cubic-bezier(0, 0, 0.2, 1);
}

.scroll-reveal-left.scrolled {
  opacity: 1;
  transform: none;
}

.scroll-reveal-right {
  opacity: 0;
  transform: translateX(20px);
  transition:
    opacity 600ms cubic-bezier(0, 0, 0.2, 1),
    transform 600ms cubic-bezier(0, 0, 0.2, 1);
}

.scroll-reveal-right.scrolled {
  opacity: 1;
  transform: none;
}

.scroll-scale-in {
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity 600ms cubic-bezier(0, 0, 0.2, 1),
    transform 600ms cubic-bezier(0, 0, 0.2, 1);
}

.scroll-scale-in.scrolled {
  opacity: 1;
  transform: scale(1);
}

/* Reduced motion — immediately visible, no transition */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal,
  .scroll-reveal.scrolled,
  .scroll-reveal-left,
  .scroll-reveal-left.scrolled,
  .scroll-reveal-right,
  .scroll-reveal-right.scrolled,
  .scroll-scale-in,
  .scroll-scale-in.scrolled {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ============================================================
   7. PARALLAX & SCROLL PERFORMANCE
   ============================================================ */

/* ---- Background parallax ---- */
.parallax-bg {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* iOS/Android: background-attachment: fixed is janky — scroll instead */
@media (max-width: 768px) {
  .parallax-bg {
    background-attachment: scroll;
  }
}

/* ---- GPU / performance utilities ---- */
.will-change-transform { will-change: transform; }
.will-change-opacity   { will-change: opacity; }

/* Force GPU layer without causing stacking context issues */
.gpu-layer {
  transform: translateZ(0);
  will-change: transform;
}

/* Full compositing layer + stacking context isolation */
.composited {
  transform: translateZ(0);
  isolation: isolate;
}

.contain-paint  { contain: paint; }
.contain-layout { contain: layout; }
.contain-strict { contain: strict; }

/* ---- Scroll snap containers ---- */
.scroll-snap-x {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.scroll-snap-x::-webkit-scrollbar {
  display: none;
}

.scroll-snap-item {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.scroll-snap-y {
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}


/* ============================================================
   8. DECORATIVE ELEMENTS
   ============================================================ */

/* ---- Gradient borders (pseudo-element technique — works with border-radius) ---- */
/* Usage: <div class="border-gradient-blue card">...</div> */

.border-gradient-blue {
  position: relative;
}
.border-gradient-blue::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, #4fb3ff, #2d7fc1, #0a4fa0);
}

.border-gradient-gold {
  position: relative;
}
.border-gradient-gold::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, #ffb800, #d49200, #a87000);
}

.border-gradient-green-gold {
  position: relative;
}
.border-gradient-green-gold::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, #2d5f4a, #4a8c6e, #c8963c);
}

/* Simple single-color top accent borders */
.border-top-accent-blue  { border-top: 3px solid #4fb3ff; }
.border-top-accent-green { border-top: 3px solid #2d5f4a; }
.border-top-accent-gold  { border-top: 3px solid #c8963c; }

/* ---- Dot patterns ---- */
/* Usage: add .dot-pattern to any container; it overlays a dot grid */
.dot-pattern {
  background-image: radial-gradient(
    circle, rgba(128, 128, 128, 0.20) 1px, transparent 1px
  );
  background-size: 24px 24px;
}

.dot-pattern-dense {
  background-image: radial-gradient(
    circle, rgba(128, 128, 128, 0.20) 1px, transparent 1px
  );
  background-size: 16px 16px;
}

.dot-pattern-blue {
  background-image: radial-gradient(
    circle, rgba(79, 179, 255, 0.12) 1px, transparent 1px
  );
  background-size: 24px 24px;
}

/* ---- Line decorations ---- */
/* .line-after: adds a short horizontal rule below the element */
.line-after::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--brand-primary, #4fb3ff);
  margin: 12px auto 0;
}

/* Left-aligned variant */
.line-after-left::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--brand-primary, #4fb3ff);
  margin: 12px 0 0;
}

/* .line-through-heading: heading text with lines extending both sides */
/* Usage: <h2 class="line-through-heading">Section Title</h2> */
.line-through-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.line-through-heading::before,
.line-through-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.20;
}

/* Gold section rule — standalone decorative line */
/* Usage: <span class="section-rule-gold"></span> */
.section-rule-gold {
  display: block;
  width: 60px;
  height: 2px;
  background: var(--brand-secondary, #c8963c);
  margin: 0 auto;
}

/* ---- Geometric background decorations ---- */
/* Large semi-transparent circle behind content */
.geo-circle-bg {
  position: relative;
  overflow: hidden; /* Clip the oversized circle */
}

.geo-circle-bg::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--brand-primary, #4fb3ff);
  opacity: 0.04;
  top: -200px;
  right: -200px;
  z-index: 0;
  pointer-events: none;
}

/* Second geometric shape — smaller circle bottom-left */
.geo-circle-bg::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--brand-secondary, #ffb800);
  opacity: 0.03;
  bottom: -100px;
  left: -100px;
  z-index: 0;
  pointer-events: none;
}


/* ============================================================
   9. PAGE TRANSITION OVERLAY
   A full-page overlay that fades out on load to create a smooth
   page entrance effect. JS or CSS animation drives the fade.
   ============================================================ */

.page-fade-in {
  animation: pageFadeIn 400ms cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Loading progress bar — thin bar at top of viewport */
.page-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--brand-primary, #4fb3ff);
  z-index: var(--z-toast, 500);
  transition: width 300ms ease;
}

.page-progress-bar.loading {
  width: 85%;
}

.page-progress-bar.complete {
  width: 100%;
  opacity: 0;
  transition: width 200ms ease, opacity 300ms ease 200ms;
}

/* Reduced motion — disable page transitions entirely */
@media (prefers-reduced-motion: reduce) {
  .page-fade-in {
    animation: none;
    opacity: 1;
  }

  .page-progress-bar {
    display: none;
  }
}


/* ============================================================
   10. TEXTURE UTILITIES
   CSS-only noise/grain effects for depth.
   ============================================================ */

/* Subtle SVG noise texture overlay */
.texture-noise {
  position: relative;
}

.texture-noise::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
  /* SVG noise pattern as data URI */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}


/* ============================================================
   11. COMBINED UTILITY COMPOSITIONS
   Common effect combinations used frequently across both sites.
   ============================================================ */

/* Card that lifts, glows blue, and shines on hover (buddocloud feature cards) */
.card-interactive-blue {
  transition: transform 200ms ease, box-shadow 250ms ease;
}

.card-interactive-blue:hover {
  transform: translateY(-4px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.20),
    0 0 20px rgba(79, 179, 255, 0.15);
}

/* Card that lifts and shows green left-border accent (OCL service cards) */
.card-interactive-green {
  transition: transform 200ms ease, box-shadow 250ms ease, border-left-color 200ms ease;
  border-left: 3px solid transparent;
}

.card-interactive-green:hover {
  transform: translateY(-4px);
  border-left-color: #2d5f4a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

/* CTA button with pulse glow — buddocloud primary CTA */
.btn-cta-primary {
  animation: glow-pulse-blue 2.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .btn-cta-primary {
    animation: none;
  }

  .card-interactive-blue:hover,
  .card-interactive-green:hover {
    transform: none;
  }
}
