/* ========================================
   KLICK KONNECT — DESIGN POLISH v1
   ========================================
   Subtle motion + glow accents.
   The goal: 3-5 elements that *quietly* feel alive,
   not every pixel screaming for attention.

   Import once in each page:
   <link rel="stylesheet" href="/design-polish.css" />
   ======================================== */

/* ─────────────────────────────────────────
   LIVE PULSE DOT — for "active", "online", "new" indicators
   Usage: <span class="live-dot"></span> or <span class="live-dot live-dot-amber"></span>
   ───────────────────────────────────────── */
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #10B981; /* emerald */
  position: relative;
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: livePulseRing 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.25;
  animation: livePulseInner 2s ease-out infinite;
  z-index: -1;
}

@keyframes livePulseRing {
  0%   { box-shadow: 0 0 0 0    rgba(16, 185, 129, 0.55); }
  70%  { box-shadow: 0 0 0 9px  rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0    rgba(16, 185, 129, 0); }
}
@keyframes livePulseInner {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50%      { opacity: 0.10; transform: scale(1.6); }
}

/* Variants */
.live-dot-amber  { background: #FBBF24; box-shadow: 0 0 0 0 rgba(251,191,36,0.7);  animation-name: livePulseRingAmber; }
.live-dot-red    { background: #E11D2E; box-shadow: 0 0 0 0 rgba(225,29,46,0.7);   animation-name: livePulseRingRed; }
.live-dot-blue   { background: #3B82F6; box-shadow: 0 0 0 0 rgba(59,130,246,0.7);  animation-name: livePulseRingBlue; }

@keyframes livePulseRingAmber { 0%{box-shadow:0 0 0 0 rgba(251,191,36,0.55);} 70%{box-shadow:0 0 0 9px rgba(251,191,36,0);} 100%{box-shadow:0 0 0 0 rgba(251,191,36,0);} }
@keyframes livePulseRingRed   { 0%{box-shadow:0 0 0 0 rgba(225,29,46,0.55);}  70%{box-shadow:0 0 0 9px rgba(225,29,46,0);}  100%{box-shadow:0 0 0 0 rgba(225,29,46,0);} }
@keyframes livePulseRingBlue  { 0%{box-shadow:0 0 0 0 rgba(59,130,246,0.55);} 70%{box-shadow:0 0 0 9px rgba(59,130,246,0);} 100%{box-shadow:0 0 0 0 rgba(59,130,246,0);} }


/* ─────────────────────────────────────────
   LIVE BADGE — "LIVE", "NEW", "HIRING"
   Usage: <span class="live-badge"><span class="live-dot"></span>HIRING NOW</span>
   ───────────────────────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px 5px 11px;
  border-radius: 100px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.28);
  color: #6EE7B7;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.live-badge-amber { background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.28); color: #FCD34D; }
.live-badge-red   { background: rgba(225,29,46,0.10);  border-color: rgba(225,29,46,0.32);  color: #FCA5A5; }


/* ─────────────────────────────────────────
   GLOW HOVER — soft glow on hover for premium cards
   Usage: add `.glow-hover` to any card
   ───────────────────────────────────────── */
.glow-hover {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.4s ease;
}
.glow-hover::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(225,29,46,0.0), rgba(225,29,46,0.15), rgba(225,29,46,0.0));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}
.glow-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px -16px rgba(225,29,46,0.35), 0 8px 22px -8px rgba(0,0,0,0.4);
}
.glow-hover:hover::before { opacity: 1; }
.glow-hover > * { position: relative; z-index: 1; }


/* ─────────────────────────────────────────
   AMBIENT MESH — cinematic blurred gradient blobs
   The "premium SaaS" background effect (think Linear / Stripe / Vercel)
   Multiple soft blobs drift slowly behind content. Heavily blurred so it
   feels like depth, not decoration.
   Usage: <div class="ambient-mesh"></div> as a background layer
   in a `position: relative` container with `overflow: hidden`.
   ───────────────────────────────────────── */
.ambient-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.ambient-mesh::before,
.ambient-mesh::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.ambient-mesh::before {
  width: 55vw; height: 55vw;
  max-width: 700px; max-height: 700px;
  top: -10%; left: -10%;
  background: radial-gradient(circle, rgba(225,29,46,0.55) 0%, rgba(225,29,46,0) 70%);
  animation: meshDriftA 22s ease-in-out infinite alternate;
}
.ambient-mesh::after {
  width: 50vw; height: 50vw;
  max-width: 600px; max-height: 600px;
  bottom: -15%; right: -15%;
  background: radial-gradient(circle, rgba(168,85,247,0.32) 0%, rgba(168,85,247,0) 70%);
  animation: meshDriftB 28s ease-in-out infinite alternate;
}

/* A third blob, optional — add a child <span class="mesh-blob-3"></span> inside .ambient-mesh */
.ambient-mesh .mesh-blob-3 {
  position: absolute;
  width: 40vw; height: 40vw;
  max-width: 500px; max-height: 500px;
  top: 30%; left: 40%;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  background: radial-gradient(circle, rgba(56,189,248,0.22) 0%, rgba(56,189,248,0) 70%);
  animation: meshDriftC 35s ease-in-out infinite alternate;
  pointer-events: none;
  will-change: transform;
}

@keyframes meshDriftA {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8vw, 5vh) scale(1.1); }
}
@keyframes meshDriftB {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-6vw, -4vh) scale(1.15); }
}
@keyframes meshDriftC {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-5vw, 6vh) scale(1.08); }
}

/* On mobile, soften the effect (smaller blobs, less blur cost) */
@media (max-width: 700px) {
  .ambient-mesh::before,
  .ambient-mesh::after,
  .ambient-mesh .mesh-blob-3 {
    filter: blur(60px);
    opacity: 0.4;
  }
}

/* ─────────────────────────────────────────
   INTERACTIVE MESH — cursor-reactive parallax
   Add .interactive-mesh. JS sets --px / --py (px offsets) on the
   container, which transforms as a whole. The blobs keep their own
   independent drift keyframes (set in the base .ambient-mesh rules),
   so drift + cursor parallax compose cleanly with no conflict.
   ───────────────────────────────────────── */
.interactive-mesh {
  --px: 0px;
  --py: 0px;
  transform: translate(var(--px), var(--py));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* Disable cursor parallax on touch / reduced-motion (drift still runs) */
@media (hover: none) {
  .interactive-mesh { transform: none; transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  .interactive-mesh { transform: none !important; }
  .interactive-mesh::before,
  .interactive-mesh::after,
  .interactive-mesh .mesh-blob-3 {
    animation: none !important;
  }
}


/* ─────────────────────────────────────────
   AMBIENT GRADIENT (legacy — still used in places, kept lighter)
   Use sparingly: ONE per page max, ideally only on homepage hero
   Usage: <div class="ambient-bg"></div> as a background layer
   ───────────────────────────────────────── */
.ambient-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    radial-gradient(60vw 60vw at 15% 25%, rgba(225,29,46,0.10), transparent 60%),
    radial-gradient(50vw 50vw at 85% 75%, rgba(225,29,46,0.06), transparent 60%);
  animation: ambientDrift 28s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes ambientDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(3%, -2%) scale(1.05); }
}


/* ─────────────────────────────────────────
   NUMBER TICKER — soft "counting up" feel for stats
   Adds a subtle gradient & a small underline glow
   Usage: wrap the number in <span class="stat-num">1,247</span>
   ───────────────────────────────────────── */
.stat-num {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #d4d4d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  letter-spacing: -0.02em;
}


/* ─────────────────────────────────────────
   SHIMMER LINE — for "loading" or "processing" states
   Replaces flat skeleton with a soft sweep
   ───────────────────────────────────────── */
.shimmer-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.03) 100%);
  background-size: 800px 100%;
  animation: shimmerSweep 1.6s ease-in-out infinite;
}
@keyframes shimmerSweep {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}


/* ─────────────────────────────────────────
   FOCUS RING — soft red glow on focused inputs
   Applies to .input, .textarea, .select sitewide
   ───────────────────────────────────────── */
.input:focus,
.textarea:focus,
.select:focus {
  box-shadow: 0 0 0 4px rgba(225,29,46,0.12);
  transition: box-shadow 0.18s ease, border-color 0.15s;
}


/* ─────────────────────────────────────────
   CTA RADIAL PULSE — soft expanding glow behind a CTA section
   Adds depth + visual "attention" to a section without being loud
   Usage: <div class="cta-radial-pulse"></div> as a background layer
   ───────────────────────────────────────── */
.cta-radial-pulse {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(255,255,255,0.18), transparent 70%);
  opacity: 0.6;
  animation: ctaRadialBreathe 7s ease-in-out infinite;
  z-index: 0;
}
@keyframes ctaRadialBreathe {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.08); }
}


/* ─────────────────────────────────────────
   PORTFOLIO ITEM REVEAL — staggered fade-up for gallery items
   Usage: each .portfolio-item gets the .pf-reveal class
   JS reads data-pf-idx and adds .visible to trigger animation
   ───────────────────────────────────────── */
.pf-reveal {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.pf-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ─────────────────────────────────────────
   RESPECT REDUCED MOTION
   Users who set "prefers-reduced-motion" get static styles.
   This is required for accessibility AND avoids motion sickness.
   ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  /* Decorative ambient effects: dim them so they don't distract */
  .ambient-bg,
  .ambient-mesh::before,
  .ambient-mesh::after,
  .ambient-mesh .mesh-blob-3,
  .cta-radial-pulse {
    animation: none !important;
    transform: none !important;
    opacity: 0.25 !important;
  }
  /* Live indicator dots: stop pulsing but keep visible */
  .live-dot,
  .live-dot::after,
  .shimmer-line {
    animation: none !important;
  }
  /* Content reveal effects: just show the content immediately */
  .fade-up,
  .pf-reveal,
  .magnetic-btn {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .glow-hover {
    transition: none !important;
  }
}


/* ─────────────────────────────────────────
   FADE-UP ON SCROLL — for section headings
   Usage: <h2 class="fade-up">…</h2>
   JS will add .visible when the element scrolls into view.
   ───────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger child elements for cascading reveals */
.fade-up.fade-up-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fade-up.fade-up-stagger.visible > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.fade-up.fade-up-stagger.visible > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
.fade-up.fade-up-stagger.visible > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.fade-up.fade-up-stagger.visible > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.35s; }


/* ─────────────────────────────────────────
   MAGNETIC BUTTON — gentle cursor tracking on hover
   Usage: add `.magnetic-btn` to a button.
   The JS uses transform; we just need transition timing here.
   ───────────────────────────────────────── */
.magnetic-btn {
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.22s ease;
  will-change: transform;
}


/* ─────────────────────────────────────────
   LIVE ACTIVITY WIDGET — fixed bottom-left
   Shows "X creators active right now"
   ───────────────────────────────────────── */
.live-activity-widget {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 80;
  background: rgba(20, 22, 26, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 9px 18px 9px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text, #fafafa);
  box-shadow: 0 8px 24px -10px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.live-activity-widget.visible {
  opacity: 1;
  transform: translateY(0);
}
.live-activity-widget strong {
  color: #6EE7B7;
  font-weight: 700;
}
@media (max-width: 700px) {
  .live-activity-widget {
    left: 12px;
    bottom: 12px;
    font-size: 11.5px;
    padding: 7px 14px 7px 11px;
  }
}

/* ═══ GLOBAL CURSOR-REACTIVE PAGE BACKGROUND (V2) ═══ */
.page-mesh{position:fixed;inset:-10%;z-index:0;pointer-events:none;overflow:visible}
.page-mesh .pm-blob{position:absolute;border-radius:50%;filter:blur(78px);will-change:transform}
.page-mesh .pm-1{width:45vw;height:45vw;max-width:720px;max-height:720px;top:-8%;left:-6%;background:radial-gradient(circle,rgba(230,57,70,.4) 0%,rgba(230,57,70,0) 70%);animation:pmDriftA 20s ease-in-out infinite alternate}
.page-mesh .pm-2{width:40vw;height:40vw;max-width:640px;max-height:640px;top:25%;right:-10%;background:radial-gradient(circle,rgba(168,85,247,.3) 0%,rgba(168,85,247,0) 70%);animation:pmDriftB 26s ease-in-out infinite alternate}
.page-mesh .pm-3{width:38vw;height:38vw;max-width:600px;max-height:600px;bottom:-12%;left:25%;background:radial-gradient(circle,rgba(56,189,248,.24) 0%,rgba(56,189,248,0) 70%);animation:pmDriftC 32s ease-in-out infinite alternate}
@keyframes pmDriftA{0%{transform:translate(0,0) scale(1)}100%{transform:translate(6vw,4vh) scale(1.12)}}
@keyframes pmDriftB{0%{transform:translate(0,0) scale(1)}100%{transform:translate(-5vw,-3vh) scale(1.18)}}
@keyframes pmDriftC{0%{transform:translate(0,0) scale(1)}100%{transform:translate(-4vw,5vh) scale(1.1)}}
@media(max-width:700px){.page-mesh .pm-blob{filter:blur(65px);opacity:.7}}
@media(hover:none){.page-mesh{transform:none!important}}
@media(prefers-reduced-motion:reduce){.page-mesh{transform:none!important}.page-mesh .pm-blob{animation:none!important}}
/* keep page content above the fixed mesh */
body>*:not(.page-mesh){position:relative;z-index:1}
/* SVG icons inherit text color, never look like emoji */
svg.ki{display:inline-block;vertical-align:-0.15em;width:1em;height:1em}

/* ═══ KLICK AURORA canvas (interactive constellation) ═══ */
#klick-aurora{position:fixed;inset:0;z-index:2;pointer-events:none}
/* screen blend: black=invisible, particles glow above every section background.
   Sits below nav (z50) and modals; never blocks clicks. */
/* soft red/purple glow beneath the constellation */
body::before{content:'';position:fixed;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse 80% 60% at 20% 25%,rgba(230,57,70,.16),transparent 55%),
             radial-gradient(ellipse 70% 50% at 85% 80%,rgba(168,85,247,.10),transparent 55%)}

/* ════ GLOBAL ICON SYSTEM — applies on every page ════
   Display icons get size + red glow + depth + float.
   Inline icons (.co-name,.cr-name,.map-pin,.wa-cta-icon,.section-eyebrow)
   stay text-sized on purpose. */
@keyframes iconFloat{0%,100%{transform:translateY(0) rotate(0deg)}50%{transform:translateY(-10px) rotate(1.5deg)}}

/* tier 1 — large feature visuals (blog cards, work placeholders) */
.card-vis,.ph-ico{
  font-size:clamp(3.6rem,6vw,5.6rem);
  color:rgba(230,57,70,.78);
  filter:drop-shadow(0 0 18px rgba(230,57,70,.4)) drop-shadow(0 12px 22px rgba(0,0,0,.55));
  animation:iconFloat 7s ease-in-out infinite;
  transition:color .3s,filter .3s;
}
/* tier 2 — medium card icons (homepage course + service cards, blog featured) */
.cci,.svc-ico,.feat-ico{
  font-size:clamp(2.5rem,4.2vw,3.6rem);
  color:rgba(230,57,70,.78);
  filter:drop-shadow(0 0 12px rgba(230,57,70,.35)) drop-shadow(0 8px 16px rgba(0,0,0,.5));
  animation:iconFloat 7.5s ease-in-out infinite;
  transition:color .3s,filter .3s;
}
/* stagger so grids don't bob in sync */
:nth-child(2n) .cci,:nth-child(2n) .svc-ico,:nth-child(2n) .feat-ico,:nth-child(2n) .card-vis,:nth-child(2n) .ph-ico{animation-delay:-2.4s}
:nth-child(3n) .cci,:nth-child(3n) .svc-ico,:nth-child(3n) .feat-ico,:nth-child(3n) .card-vis,:nth-child(3n) .ph-ico{animation-delay:-4.6s}
/* hover: full red, brighter glow, pause the float */
a:hover .cci,a:hover .svc-ico,a:hover .feat-ico,a:hover .card-vis,a:hover .ph-ico,
.glow-hover:hover .cci,.glow-hover:hover .svc-ico,.glow-hover:hover .feat-ico,.glow-hover:hover .card-vis,.glow-hover:hover .ph-ico,
div[class]:hover>.cci,div[class]:hover>.svc-ico,div[class]:hover>.feat-ico{
  color:rgba(230,57,70,1);
  filter:drop-shadow(0 0 22px rgba(230,57,70,.6)) drop-shadow(0 10px 18px rgba(0,0,0,.55));
  animation-play-state:paused;
}
/* inline icons: subtle contrast bump only, no size/animation change */
.co-name .ki,.cr-name .ki,.map-pin .ki,.wa-cta-icon .ki{color:var(--red,#e63946)}
@media(prefers-reduced-motion:reduce){.cci,.svc-ico,.feat-ico,.card-vis,.ph-ico{animation:none!important}}


/* ════ ICON SYSTEM v2 — dominant, attention-commanding ════ */
@keyframes iconGlowPulse{
  0%,100%{filter:drop-shadow(0 0 10px rgba(230,57,70,.45)) drop-shadow(0 0 30px rgba(230,57,70,.2)) drop-shadow(0 10px 18px rgba(0,0,0,.55))}
  50%{filter:drop-shadow(0 0 24px rgba(230,57,70,.95)) drop-shadow(0 0 70px rgba(230,57,70,.5)) drop-shadow(0 12px 22px rgba(0,0,0,.6))}
}
@keyframes iconBreath{0%,100%{transform:translateY(0) scale(1) rotate(0deg)}50%{transform:translateY(-12px) scale(1.06) rotate(2deg)}}
.cci,.svc-ico,.feat-ico,.card-vis,.ph-ico{
  color:#e63946;
  animation:iconBreath 5.5s ease-in-out infinite, iconGlowPulse 2.6s ease-in-out infinite;
}
:nth-child(2n) .cci,:nth-child(2n) .svc-ico,:nth-child(2n) .feat-ico,:nth-child(2n) .card-vis,:nth-child(2n) .ph-ico{animation-delay:-1.8s,-1.1s}
:nth-child(3n) .cci,:nth-child(3n) .svc-ico,:nth-child(3n) .feat-ico,:nth-child(3n) .card-vis,:nth-child(3n) .ph-ico{animation-delay:-3.6s,-2s}
a:hover .cci,a:hover .svc-ico,a:hover .feat-ico,a:hover .card-vis,a:hover .ph-ico,
.glow-hover:hover .cci,.glow-hover:hover .svc-ico,.glow-hover:hover .feat-ico,
div[class]:hover>.cci,div[class]:hover>.svc-ico,div[class]:hover>.feat-ico{
  animation:iconGlowPulse 1s ease-in-out infinite;
  transform:scale(1.22) rotate(-4deg);
  transition:transform .25s cubic-bezier(.34,1.56,.64,1);
}
@media(prefers-reduced-motion:reduce){
  .cci,.svc-ico,.feat-ico,.card-vis,.ph-ico{animation:none!important;transform:none!important;
    filter:drop-shadow(0 0 18px rgba(230,57,70,.6)) drop-shadow(0 10px 18px rgba(0,0,0,.55))!important}
}
