/* =============================================
   Webapp Vision — WOW Effects
   ============================================= */

/* ===== CUSTOM CURSOR (alleen desktop) ===== */
@media (pointer: fine) {
  * { cursor: none !important; }

  .fx-cursor-dot {
    position: fixed;
    width: 8px; height: 8px;
    background: var(--blue);
    border-radius: 50%;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 999999;
    box-shadow: 0 0 10px var(--blue), 0 0 20px rgba(0,113,227,.5);
    transition: background .2s, width .2s, height .2s;
  }

  .fx-cursor-ring {
    position: fixed;
    width: 38px; height: 38px;
    border: 1.5px solid rgba(0,113,227,.6);
    border-radius: 50%;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 999998;
    transition: border-color .25s, box-shadow .25s;
  }

  .fx-cursor-ring.hover {
    border-color: var(--purple);
    box-shadow: 0 0 18px rgba(124,58,237,.45);
  }

  .fx-cursor-ring.clicking {
    border-color: #fff;
    box-shadow: 0 0 24px rgba(255,255,255,.6);
  }
}

/* ===== HERO PARTICLES CANVAS ===== */
.fx-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ===== SCROLL PROGRESS BAR ===== */
.fx-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--purple), #ff6b35);
  background-size: 200%;
  z-index: 999997;
  box-shadow: 0 0 10px var(--blue);
  animation: progressGlow 2s linear infinite;
  transition: width .1s linear;
}
@keyframes progressGlow {
  0%,100% { box-shadow: 0 0 8px var(--blue); }
  50%     { box-shadow: 0 0 16px var(--purple); }
}

/* ===== RIPPLE ===== */
.fx-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  pointer-events: none;
  transform: scale(0);
  animation: fxRipple .6s ease-out forwards;
}
@keyframes fxRipple {
  to { transform: scale(2.5); opacity: 0; }
}

/* ===== SPARKLES ===== */
.fx-sparkle {
  position: absolute;
  pointer-events: none;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: fxSparkle .55s ease-out forwards;
}
@keyframes fxSparkle {
  0%   { opacity: 1; transform: translate(-50%,-50%) rotate(var(--a,0deg)) translateY(0) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) rotate(var(--a,0deg)) translateY(var(--d,-30px)) scale(0); }
}

/* ===== MOUSE TRAIL GLOW ===== */
.fx-trail {
  position: fixed;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,113,227,.55) 0%, transparent 70%);
  pointer-events: none;
  z-index: 99990;
  transform: translate(-50%,-50%) scale(1);
  transition: opacity .35s ease, transform .35s ease;
}

/* ===== GRADIENT TEXT ANIMATION ===== */
.grad, .gradient-text {
  background-size: 200% auto !important;
  animation: gradMove 4s linear infinite !important;
}
@keyframes gradMove {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ===== FLOATING BADGE ===== */
.hero-badge {
  animation: floatBadge 3s ease-in-out infinite !important;
}
@keyframes floatBadge {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}

/* ===== 3D CARD TILT ===== */
.svc-card, .glass-card, .pricing-card, .portfolio-card {
  will-change: transform;
  transform-style: preserve-3d;
}

/* ===== CARD GLOW BORDERS ===== */
.svc-card::after, .glass-card::after, .pricing-card:not(.featured)::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--blue));
  background-size: 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s;
  animation: gradMove 3s linear infinite;
  pointer-events: none;
}
.svc-card:hover::after, .glass-card:hover::after, .pricing-card:not(.featured):hover::after {
  opacity: 1;
}

/* ===== MAGNETIC BUTTON GLOW ===== */
.btn-blue {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 rgba(0,113,227,0);
  transition: box-shadow .3s, transform .2s, opacity .2s !important;
}
.btn-blue:hover {
  box-shadow: 0 8px 30px rgba(0,113,227,.45) !important;
  opacity: 1 !important;
}

/* ===== HERO SECTION GRID BG ===== */
.fx-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,113,227,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,113,227,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ===== NEON GLOW TEXT ON HOVER ===== */
.svc-title:hover, .section-h2:hover {
  text-shadow: 0 0 30px rgba(0,113,227,.2);
  transition: text-shadow .3s;
}

/* ===== SMOOTH REVEAL — betere varianten ===== */
.reveal-left  { opacity:0; transform: translateX(-40px); transition: opacity .8s cubic-bezier(.4,0,.2,1), transform .8s cubic-bezier(.4,0,.2,1); }
.reveal-right { opacity:0; transform: translateX(40px);  transition: opacity .8s cubic-bezier(.4,0,.2,1), transform .8s cubic-bezier(.4,0,.2,1); }
.reveal-zoom  { opacity:0; transform: scale(.9);         transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1); }
.reveal-left.visible, .reveal-right.visible, .reveal-zoom.visible { opacity:1; transform: none; }

/* ===== TYPING CURSOR ===== */
.fx-typing::after {
  content: '|';
  animation: blink .7s step-end infinite;
  color: var(--blue);
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* ===== PAGE SPOTLIGHT ===== */
.fx-spotlight {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  opacity: .7;
}

/* ===== TAG GLITCH ===== */
.fx-tag-glitch {
  animation: fxTagGlitch .25s steps(2) 1;
  color: var(--blue) !important;
}
@keyframes fxTagGlitch {
  0%   { transform: translate(0); }
  25%  { transform: translate(-2px, 1px) skew(2deg); }
  50%  { transform: translate(2px, -1px) skew(-2deg); }
  75%  { transform: translate(-1px, 0); }
  100% { transform: translate(0); }
}

/* ===== LOGO SPIN ===== */
@keyframes fxLogoSpin {
  0%   { transform: rotateY(0deg) scale(1); }
  50%  { transform: rotateY(180deg) scale(1.08); }
  100% { transform: rotateY(360deg) scale(1); }
}

/* ===== DARK MODE TWEAKS FOR EFFECTS ===== */
[data-theme="dark"] .fx-grid-bg {
  background-image:
    linear-gradient(rgba(58,158,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,158,255,.05) 1px, transparent 1px);
}
[data-theme="dark"] .fx-cursor-dot { background: #3a9eff; box-shadow: 0 0 12px #3a9eff, 0 0 24px rgba(58,158,255,.5); }
[data-theme="dark"] .fx-cursor-ring { border-color: rgba(58,158,255,.6); }
[data-theme="dark"] .fx-progress { box-shadow: 0 0 10px #3a9eff; }

/* =============================================
   MEGA EFFECTS v4 — Layer 2
   ============================================= */

/* ===== 3D KEYBOARD ===== */
.fx-keyboard-scene { perspective: 900px; display: inline-block; }
.fx-keyboard {
  background: linear-gradient(145deg,#12122a,#0a0a1a);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 30px 70px rgba(0,0,0,.7), 0 0 50px rgba(0,113,227,.12);
  transform: rotateX(12deg) rotateY(-1deg);
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}
.fx-kb-row { display: flex; gap: 4px; justify-content: center; }
.fx-key {
  position: relative;
  width: 36px; height: 34px;
  cursor: pointer; user-select: none;
  transition: transform .08s ease;
}
.fx-key-top {
  position: absolute; inset: 0;
  background: linear-gradient(160deg,#282840,#1a1a30);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'SF Mono','Fira Code',monospace;
  font-size: .62rem; font-weight: 600;
  color: rgba(255,255,255,.72);
  box-shadow: 0 3px 0 rgba(0,0,0,.6);
  transition: background .15s, box-shadow .15s, color .15s;
  z-index: 1;
}
.fx-key-front {
  position: absolute;
  bottom: 0; left: 2px; right: 2px; height: 3px;
  background: rgba(0,0,0,.55);
  border-radius: 0 0 3px 3px;
  transition: height .08s;
}
.fx-key:hover .fx-key-top {
  background: linear-gradient(160deg,#353568,#252550);
  box-shadow: 0 3px 0 rgba(0,0,0,.6), 0 0 18px rgba(0,113,227,.5);
  color: #fff;
}
.fx-key:hover { transform: translateY(2px); }
.fx-key:hover .fx-key-front { height: 1px; }
.fx-key:active .fx-key-top {
  background: linear-gradient(135deg,#0060c7,#6a30d0);
  box-shadow: 0 0 0 rgba(0,0,0,.6), 0 0 22px rgba(0,113,227,.9);
  color: #fff;
}
.fx-key:active, .fx-key-pressed { transform: translateY(4px); }
.fx-key:active .fx-key-front, .fx-key-pressed .fx-key-front { height: 0; }
.fx-key-wide  { width: 50px; }
.fx-key-shift { width: 56px; }
.fx-key-fn    { width: 42px; }
.fx-key-space { width: 190px; }
.fx-key-cracked .fx-key-top {
  background: linear-gradient(160deg,#1a0808,#1e0a0a) !important;
  border-color: rgba(255,60,60,.25) !important;
  box-shadow: 0 0 8px rgba(255,40,40,.2) !important;
  color: rgba(255,80,80,.5) !important;
  text-decoration: line-through;
}

/* ===== CODE EDITOR ===== */
.fx-code-editor {
  background: #0d1117;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.fx-editor-bar {
  background: #161b22;
  padding: 9px 14px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.fx-traffic-lights { display: flex; gap: 5px; align-items: center; }
.fx-tl { width: 11px; height: 11px; border-radius: 50%; display: block; }
.fx-tl-r { background: #ff5f56; }
.fx-tl-y { background: #ffbd2e; }
.fx-tl-g { background: #27c93f; }
.fx-editor-body { display: flex; flex: 1; min-height: 280px; }
.fx-line-numbers {
  padding: 12px 10px;
  color: rgba(255,255,255,.18);
  text-align: right;
  border-right: 1px solid rgba(255,255,255,.05);
  min-width: 34px;
  user-select: none;
  font-family: monospace; font-size: .72rem; line-height: 1.72;
}
.fx-code-pre {
  flex: 1; padding: 12px 14px; margin: 0;
  color: #e6edf3;
  font-family: 'Fira Code','Consolas',monospace;
  font-size: .72rem; line-height: 1.72;
  overflow: hidden; white-space: pre-wrap; word-break: break-all;
}

/* ===== 3D BROWSER ===== */
.fx-browser-3d {
  background: #1c1c1e;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
  min-height: 320px;
  transition: transform .4s cubic-bezier(.4,0,.2,1), box-shadow .4s, border-color .4s;
}
.fx-browser-bar {
  background: #2c2c2e;
  padding: 9px 14px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.fx-url-bar {
  background: rgba(255,255,255,.07);
  border-radius: 5px; padding: 3px 10px;
  font-size: .68rem; color: rgba(255,255,255,.55);
  display: flex; align-items: center; gap: 5px;
  font-family: monospace; flex: 1; max-width: 200px;
}
.fx-browser-screen {
  flex: 1; background: #f5f5f7;
  min-height: 260px; overflow: hidden;
}
.fx-sk-wrap { padding: 0; }
.fx-sk-nav  { height: 36px; background: #c8c8ca; }
.fx-sk-body { padding: 16px; }
.fx-preview-skeleton {
  background: linear-gradient(90deg,#e0e0e2 25%,#eaeaec 50%,#e0e0e2 75%);
  background-size: 200% 100%;
  animation: skShimmer 1.4s infinite;
  border-radius: 5px; margin-bottom: 10px;
}
.fx-sk-h1  { height: 26px; width: 62%; }
.fx-sk-p   { height: 11px; width: 88%; }
.fx-sk-short { width: 52%; }
.fx-sk-btn { height: 32px; width: 110px; border-radius: 16px; margin-top: 6px; }
@keyframes skShimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes fxPreviewAppear {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== FLOATING CODE ===== */
.fx-float-code {
  position: fixed;
  font-family: 'Fira Code','Consolas',monospace;
  font-size: .62rem;
  color: rgba(0,113,227,.22);
  pointer-events: none; white-space: nowrap;
  z-index: 1;
  animation: floatCodeDrift linear forwards;
}
[data-theme="dark"] .fx-float-code { color: rgba(100,180,255,.14); }
@keyframes floatCodeDrift {
  0%   { opacity: 0; transform: translateY(0); }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-90px); }
}

/* ===== CLICK BURST ===== */
@keyframes fxBurstParticle {
  0%   { opacity: 1; transform: translate(-50%,-50%) rotate(var(--ba,0deg)) translateY(0) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) rotate(var(--ba,0deg)) translateY(var(--bd,-50px)) scale(0); }
}

/* ===== CONFETTI ===== */
@keyframes fxConfettiFall {
  0%   { opacity: 1; transform: translateY(0) translateX(0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translateY(220px) translateX(var(--cfx,0)) rotate(420deg) scale(.3); }
}

/* ===== SCAN LINE ===== */
.fx-scanline {
  position: fixed; top: 0; left: 0; right: 0; height: 1.5px;
  background: linear-gradient(90deg,transparent 0%,rgba(0,113,227,.15) 30%,rgba(124,58,237,.15) 70%,transparent 100%);
  pointer-events: none; z-index: 999997;
  animation: fxScanLine 12s linear infinite;
}
@keyframes fxScanLine {
  0%   { top: -2px; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100vh; opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .demo-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 680px) {
  .fx-keyboard-scene { transform: scale(0.52); transform-origin: center top; }
  .fx-keyboard { transform: none; }
}

/* =============================================
   MEGA EFFECTS v5 — Layer 3
   ============================================= */

/* ===== CHARACTER ANIMATION ===== */
.fx-char {
  display: inline-block;
  animation: fxCharIn .65s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes fxCharIn {
  0%   { opacity: 0; transform: translateY(24px) rotate(-8deg) scale(.6); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

/* ===== WORD ANIMATION ===== */
.fx-word {
  display: inline-block;
  animation: fxWordIn .7s cubic-bezier(.34,1.36,.64,1) both;
}
@keyframes fxWordIn {
  0%   { opacity: 0; transform: translateY(40px) scale(.85); filter: blur(4px); }
  60%  { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ===== AURORA ===== */
@keyframes fxAuroraFloat {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(var(--ax,30px),var(--ay,20px)) scale(var(--as,1.2)); }
}

/* ===== FLOATING GEO SHAPES ===== */
@keyframes fxGeoFloat {
  0%   { opacity: 0;              transform: translateY(0)     rotate(0deg) scale(1); }
  8%   { opacity: var(--go,.05); }
  92%  { opacity: var(--go,.05); }
  100% { opacity: 0;              transform: translateY(-110px) rotate(360deg) scale(1.1); }
}

/* ===== SHINE SWEEP ===== */
.fx-shine {
  position: absolute;
  top: 0; bottom: 0;
  width: 50px;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.22),transparent);
  transform: skewX(-18deg) translateX(-120px);
  pointer-events: none;
  z-index: 5;
  border-radius: 4px;
}
.fx-shine-active {
  animation: fxShineSweep .7s ease-out forwards;
}
@keyframes fxShineSweep {
  from { transform: skewX(-18deg) translateX(-120px); }
  to   { transform: skewX(-18deg) translateX(calc(100% + 240px)); }
}

/* ===== NEON PULSE ===== */
.fx-neon-pulse {
  animation: fxNeonPulse 2.2s ease-in-out;
}
@keyframes fxNeonPulse {
  0%,100% { text-shadow: none; }
  20%     { text-shadow: 0 0 20px rgba(0,113,227,.6), 0 0 44px rgba(0,113,227,.3); }
  50%     { text-shadow: 0 0 28px rgba(124,58,237,.7), 0 0 56px rgba(124,58,237,.35); }
  80%     { text-shadow: 0 0 18px rgba(0,113,227,.5), 0 0 36px rgba(0,113,227,.25); }
}

/* ===== RING EXPAND (CTA extra) ===== */
@keyframes fxRingExpand {
  0%   { transform: translate(-50%,-50%) scale(.8); opacity: .6; }
  100% { transform: translate(-50%,-50%) scale(2);  opacity: 0; }
}
